Skip to content

Commit

Permalink
Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
idmarinas committed Nov 29, 2024
1 parent afec68a commit 5607147
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Validator/Constraint/IsEvenValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function validate ($value, Constraint $constraint): void
}

if (!is_numeric($value)) {
//-- Tiene que ser un valor entero o decimal
//-- Must be an integer or decimal value
throw new UnexpectedValueException($value, 'int|float');
}

Expand Down
4 changes: 2 additions & 2 deletions src/Validator/Constraint/IsOddValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public function validate ($value, Constraint $constraint): void
}

if (!is_numeric($value)) {
//-- Tiene que ser un valor entero o decimal
//-- Must be an integer or decimal value
throw new UnexpectedValueException($value, 'int|float');
}

//-- Check if number is odd, if is even add a violation
//-- Check if number is odd, if is even adding a violation
if ($value % 2 == 0) {
$this->context
->buildViolation($constraint->message)->setParameter('{{ number }}', $value)->addViolation()
Expand Down

0 comments on commit 5607147

Please sign in to comment.