Skip to content

Commit ccf4935

Browse files
committed
minor symfony#19266 [Validator] make UuidValidator class formatting consistent. (hhamon)
This PR was merged into the 2.7 branch. Discussion ---------- [Validator] make UuidValidator class formatting consistent. | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ Commits ------- 3cc2f10 [Validator] make UuidValidator class formatting consistent.
2 parents e262ef0 + 3cc2f10 commit ccf4935

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/Symfony/Component/Validator/Constraints/UuidValidator.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,20 +232,14 @@ private function validateStrict($value, Uuid $constraint)
232232
if ($i !== $h) {
233233
if ($this->context instanceof ExecutionContextInterface) {
234234
$this->context->buildViolation($constraint->message)
235-
->setParameter(
236-
'{{ value }}',
237-
$this->formatValue($value)
238-
)
239-
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
240-
->addViolation();
235+
->setParameter('{{ value }}', $this->formatValue($value))
236+
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
237+
->addViolation();
241238
} else {
242239
$this->buildViolation($constraint->message)
243-
->setParameter(
244-
'{{ value }}',
245-
$this->formatValue($value)
246-
)
247-
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
248-
->addViolation();
240+
->setParameter('{{ value }}', $this->formatValue($value))
241+
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
242+
->addViolation();
249243
}
250244

251245
return;

0 commit comments

Comments
 (0)