Skip to content

Commit

Permalink
minor #44330 Fix redundant type casts (fancyweb)
Browse files Browse the repository at this point in the history
This PR was merged into the 5.3 branch.

Discussion
----------

Fix redundant type casts

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Continuation of symfony/symfony#44274 on 5.3

Commits
-------

4243335012 Fix redundant type casts
  • Loading branch information
nicolas-grekas committed Nov 29, 2021
2 parents 90152f7 + b61a9eb commit 124a042
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ protected function computeFallbackLocales(string $locale)
*/
protected function assertValidLocale(string $locale)
{
if (!preg_match('/^[a-z0-9@_\\.\\-]*$/i', (string) $locale)) {
if (!preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) {
throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale));
}
}
Expand Down

0 comments on commit 124a042

Please sign in to comment.