[Validator] make UuidValidator class formatting consistent.
This commit is contained in:
parent
e262ef046b
commit
3cc2f10541
@ -232,18 +232,12 @@ 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 }}',
|
|
||||||
$this->formatValue($value)
|
|
||||||
)
|
|
||||||
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
||||||
->addViolation();
|
->addViolation();
|
||||||
} else {
|
} else {
|
||||||
$this->buildViolation($constraint->message)
|
$this->buildViolation($constraint->message)
|
||||||
->setParameter(
|
->setParameter('{{ value }}', $this->formatValue($value))
|
||||||
'{{ value }}',
|
|
||||||
$this->formatValue($value)
|
|
||||||
)
|
|
||||||
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
|
||||||
->addViolation();
|
->addViolation();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user