Skip to content

Commit

Permalink
Fixed ide suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
idmarinas committed Dec 27, 2023
1 parent 88f0317 commit 830c672
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Validator/Constraints/IsEvenValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Exception\UnexpectedValueException;
use function is_numeric;

/**
* Check if value is even.
Expand All @@ -36,7 +37,7 @@ public function validate($value, Constraint $constraint)
return;
}

if ( ! \is_numeric($value))
if ( ! is_numeric($value))
{
//-- Tiene que ser un valor entero o decimal
throw new UnexpectedValueException($value, 'int|float');
Expand Down
3 changes: 2 additions & 1 deletion src/Validator/Constraints/IsOddValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Exception\UnexpectedValueException;
use function is_numeric;

/**
* Check if value is odd.
Expand All @@ -36,7 +37,7 @@ public function validate($value, Constraint $constraint)
return;
}

if ( ! \is_numeric($value))
if ( ! is_numeric($value))
{
//-- Tiene que ser un valor entero o decimal
throw new UnexpectedValueException($value, 'int|float');
Expand Down

0 comments on commit 830c672

Please sign in to comment.