minor #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.
This commit is contained in:
commit
ccf4935020
@ -232,18 +232,12 @@ class UuidValidator extends ConstraintValidator
|
||||
if ($i !== $h) {
|
||||
if ($this->context instanceof ExecutionContextInterface) {
|
||||
$this->context->buildViolation($constraint->message)
|
||||
->setParameter(
|
||||
'{{ value }}',
|
||||
$this->formatValue($value)
|
||||
)
|
||||
->setParameter('{{ value }}', $this->formatValue($value))
|
||||
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
||||
->addViolation();
|
||||
} else {
|
||||
$this->buildViolation($constraint->message)
|
||||
->setParameter(
|
||||
'{{ value }}',
|
||||
$this->formatValue($value)
|
||||
)
|
||||
->setParameter('{{ value }}', $this->formatValue($value))
|
||||
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
||||
->addViolation();
|
||||
}
|
||||
|
Reference in New Issue
Block a user