Skip to content

Commit

Permalink
minor #19266 [Validator] make UuidValidator class formatting consiste…
Browse files Browse the repository at this point in the history
…nt. (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.
  • Loading branch information
fabpot committed Jul 2, 2016
2 parents e262ef0 + 3cc2f10 commit ccf4935
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/Symfony/Component/Validator/Constraints/UuidValidator.php
Expand Up @@ -232,20 +232,14 @@ private function validateStrict($value, Uuid $constraint)
if ($i !== $h) {
if ($this->context instanceof ExecutionContextInterface) {
$this->context->buildViolation($constraint->message)
->setParameter(
'{{ value }}',
$this->formatValue($value)
)
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
->addViolation();
->setParameter('{{ value }}', $this->formatValue($value))
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
->addViolation();
} else {
$this->buildViolation($constraint->message)
->setParameter(
'{{ value }}',
$this->formatValue($value)
)
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
->addViolation();
->setParameter('{{ value }}', $this->formatValue($value))
->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR)
->addViolation();
}

return;
Expand Down

0 comments on commit ccf4935

Please sign in to comment.