We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just curious, what is the best way to localize this method:
https://github.com/beberlei/assert/blob/master/lib/Assert/Assertion.php#L2558
The text was updated successfully, but these errors were encountered:
You can override the method in your own subclass, or you can provide a callback with each assertion.
But it would probably be better to provide your own Exception class that will generate an appropriate message based upon the exception code.
Sorry, something went wrong.
This wouldn't work with default messages though:
https://github.com/beberlei/assert/blob/master/lib/Assert/Assertion.php#L2543
$message = \sprintf(static::generateMessage($message) ?: 'Value "%s" expected to be a defined constant.', $constant);
while something like this would work:
$message = \sprintf(static::generateMessage($message ?: 'Value "%s" expected to be a defined constant.'), $constant);
any ideas?
\Assert\Assertion::generateMessage() will now receive the default m…
\Assert\Assertion::generateMessage()
d6a21f8
…essage for an assertion if one is not supplied (Thanks to [Romans Malinovskis](#225))
No branches or pull requests
Just curious, what is the best way to localize this method:
https://github.com/beberlei/assert/blob/master/lib/Assert/Assertion.php#L2558
The text was updated successfully, but these errors were encountered: