minor #22232 CS: Remove invisible chars (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #22232).
Discussion
----------
CS: Remove invisible chars
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
I found out that we have 2 non-visible in regular IDE chars in codebase.
One is just inside a comment, it could be safely removed.
But second is inside a real code, I have replaced it with `pack`, so one won't accidentally replace non-breaking space with regular space.
Commits
-------
0f623f4
CS: Remove invisible chars
This commit is contained in:
commit
d518e42ec9
@ -120,7 +120,7 @@ class PercentToLocalizedStringTransformer implements DataTransformerInterface
|
||||
|
||||
$formatter = $this->getNumberFormatter();
|
||||
// replace normal spaces so that the formatter can read them
|
||||
$value = $formatter->parse(str_replace(' ', ' ', $value));
|
||||
$value = $formatter->parse(str_replace(' ', "\xc2\xa0", $value));
|
||||
|
||||
if (intl_is_failure($formatter->getErrorCode())) {
|
||||
throw new TransformationFailedException($formatter->getErrorMessage());
|
||||
|
@ -59,7 +59,7 @@ class ValidatorExtension extends AbstractExtension
|
||||
|
||||
public function loadTypeGuesser()
|
||||
{
|
||||
// 2.5 API
|
||||
// 2.5 API
|
||||
if ($this->validator instanceof ValidatorInterface) {
|
||||
return new ValidatorTypeGuesser($this->validator);
|
||||
}
|
||||
|
Reference in New Issue
Block a user