X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FIsNullValidator.php;h=01b9d1e40a05e7a2dda01ea9cb082476760ce619;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=1b7567fe52f14a7d61783eef97dbb4ab464cc92a;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/validator/Constraints/IsNullValidator.php b/vendor/symfony/validator/Constraints/IsNullValidator.php index 1b7567fe5..01b9d1e40 100644 --- a/vendor/symfony/validator/Constraints/IsNullValidator.php +++ b/vendor/symfony/validator/Constraints/IsNullValidator.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Validator\Constraints; -use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; @@ -31,17 +30,10 @@ class IsNullValidator extends ConstraintValidator } if (null !== $value) { - if ($this->context instanceof ExecutionContextInterface) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(IsNull::NOT_NULL_ERROR) - ->addViolation(); - } else { - $this->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(IsNull::NOT_NULL_ERROR) - ->addViolation(); - } + $this->context->buildViolation($constraint->message) + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(IsNull::NOT_NULL_ERROR) + ->addViolation(); } } }