diff vendor/symfony/validator/Constraints/CollectionValidator.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
line wrap: on
line diff
--- a/vendor/symfony/validator/Constraints/CollectionValidator.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/validator/Constraints/CollectionValidator.php	Thu Feb 28 13:21:36 2019 +0000
@@ -33,7 +33,7 @@
             return;
         }
 
-        if (!is_array($value) && !($value instanceof \Traversable && $value instanceof \ArrayAccess)) {
+        if (!\is_array($value) && !($value instanceof \Traversable && $value instanceof \ArrayAccess)) {
             throw new UnexpectedTypeException($value, 'array or Traversable and ArrayAccess');
         }
 
@@ -50,11 +50,11 @@
 
         foreach ($constraint->fields as $field => $fieldConstraint) {
             // bug fix issue #2779
-            $existsInArray = is_array($value) && array_key_exists($field, $value);
+            $existsInArray = \is_array($value) && array_key_exists($field, $value);
             $existsInArrayAccess = $value instanceof \ArrayAccess && $value->offsetExists($field);
 
             if ($existsInArray || $existsInArrayAccess) {
-                if (count($fieldConstraint->constraints) > 0) {
+                if (\count($fieldConstraint->constraints) > 0) {
                     $context->getValidator()
                         ->inContext($context)
                         ->atPath('['.$field.']')