Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / validator / Constraints / IsFalseValidator.php
index 522a1a25fcef0f15366179888dd344acaafafa77..95245fb97bd9d7b7d02dda756efd23196f175f35 100644 (file)
@@ -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;
@@ -34,16 +33,9 @@ class IsFalseValidator extends ConstraintValidator
             return;
         }
 
-        if ($this->context instanceof ExecutionContextInterface) {
-            $this->context->buildViolation($constraint->message)
-                ->setParameter('{{ value }}', $this->formatValue($value))
-                ->setCode(IsFalse::NOT_FALSE_ERROR)
-                ->addViolation();
-        } else {
-            $this->buildViolation($constraint->message)
-                ->setParameter('{{ value }}', $this->formatValue($value))
-                ->setCode(IsFalse::NOT_FALSE_ERROR)
-                ->addViolation();
-        }
+        $this->context->buildViolation($constraint->message)
+            ->setParameter('{{ value }}', $this->formatValue($value))
+            ->setCode(IsFalse::NOT_FALSE_ERROR)
+            ->addViolation();
     }
 }