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,20 +232,14 @@ class UuidValidator extends ConstraintValidator
|
|||||||
if ($i !== $h) {
|
if ($i !== $h) {
|
||||||
if ($this->context instanceof ExecutionContextInterface) {
|
if ($this->context instanceof ExecutionContextInterface) {
|
||||||
$this->context->buildViolation($constraint->message)
|
$this->context->buildViolation($constraint->message)
|
||||||
->setParameter(
|
->setParameter('{{ value }}', $this->formatValue($value))
|
||||||
'{{ value }}',
|
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
||||||
$this->formatValue($value)
|
->addViolation();
|
||||||
)
|
|
||||||
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
|
||||||
->addViolation();
|
|
||||||
} else {
|
} else {
|
||||||
$this->buildViolation($constraint->message)
|
$this->buildViolation($constraint->message)
|
||||||
->setParameter(
|
->setParameter('{{ value }}', $this->formatValue($value))
|
||||||
'{{ value }}',
|
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
||||||
$this->formatValue($value)
|
->addViolation();
|
||||||
)
|
|
||||||
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
|
||||||
->addViolation();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user