8000 minor #22232 CS: Remove invisible chars (keradus) · symfony/symfony@d518e42 · GitHub
[go: up one dir, main page]

Skip to content

Commit d518e42

Browse files
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
2 parents 03755ee + 0f623f4 commit d518e42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function reverseTransform($value)
120120

121121
$formatter = $this->getNumberFormatter();
122122
// replace normal spaces so that the formatter can read them
123-
$value = $formatter->parse(str_replace(' ', ' ', $value));
123+
$value = $formatter->parse(str_replace(' ', "\xc2\xa0", $value));
124124

125125
if (intl_is_failure($formatter->getErrorCode())) {
126126
throw new TransformationFailedException($formatter->getErrorMessage());

src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php

Lines changed: 1 addition & 1 deletion
6DE5
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct($validator)
5959

6060
public function loadTypeGuesser()
6161
{
62-
// 2.5 API
62+
// 2.5 API
6363
if ($this->validator instanceof ValidatorInterface) {
6464
return new ValidatorTypeGuesser($this->validator);
6565
}

0 commit comments

Comments
 (0)
0