X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FComposite.php;fp=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FComposite.php;h=d233f06335e1a135bfae2e1d27a74d59d773164b;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=d1391bb0724af2f9fc0d4cc793d75e524997324f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/vendor/symfony/validator/Constraints/Composite.php b/vendor/symfony/validator/Constraints/Composite.php index d1391bb07..d233f0633 100644 --- a/vendor/symfony/validator/Constraints/Composite.php +++ b/vendor/symfony/validator/Constraints/Composite.php @@ -61,21 +61,21 @@ abstract class Composite extends Constraint $compositeOption = $this->getCompositeOption(); $nestedConstraints = $this->$compositeOption; - if (!is_array($nestedConstraints)) { + if (!\is_array($nestedConstraints)) { $nestedConstraints = array($nestedConstraints); } foreach ($nestedConstraints as $constraint) { if (!$constraint instanceof Constraint) { - if (is_object($constraint)) { - $constraint = get_class($constraint); + if (\is_object($constraint)) { + $constraint = \get_class($constraint); } - throw new ConstraintDefinitionException(sprintf('The value %s is not an instance of Constraint in constraint %s', $constraint, get_class($this))); + throw new ConstraintDefinitionException(sprintf('The value %s is not an instance of Constraint in constraint %s', $constraint, \get_class($this))); } if ($constraint instanceof Valid) { - throw new ConstraintDefinitionException(sprintf('The constraint Valid cannot be nested inside constraint %s. You can only declare the Valid constraint directly on a field or method.', get_class($this))); + throw new ConstraintDefinitionException(sprintf('The constraint Valid cannot be nested inside constraint %s. You can only declare the Valid constraint directly on a field or method.', \get_class($this))); } } @@ -98,14 +98,8 @@ abstract class Composite extends Constraint if (property_exists($constraint, 'groups')) { $excessGroups = array_diff($constraint->groups, $this->groups); - if (count($excessGroups) > 0) { - throw new ConstraintDefinitionException(sprintf( - 'The group(s) "%s" passed to the constraint %s '. - 'should also be passed to its containing constraint %s', - implode('", "', $excessGroups), - get_class($constraint), - get_class($this) - )); + if (\count($excessGroups) > 0) { + throw new ConstraintDefinitionException(sprintf('The group(s) "%s" passed to the constraint %s should also be passed to its containing constraint %s', implode('", "', $excessGroups), \get_class($constraint), \get_class($this))); } } else { $constraint->groups = $this->groups;