Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / validator / Constraints / CallbackValidator.php
index 733ee43ba75e333e8b7e96e84d71c9237261aef9..a66840eae1338b09810028e3361042e3d7720eec 100644 (file)
@@ -35,18 +35,18 @@ class CallbackValidator extends ConstraintValidator
         $method = $constraint->callback;
         if ($method instanceof \Closure) {
             $method($object, $this->context, $constraint->payload);
-        } elseif (is_array($method)) {
-            if (!is_callable($method)) {
-                if (isset($method[0]) && is_object($method[0])) {
-                    $method[0] = get_class($method[0]);
+        } elseif (\is_array($method)) {
+            if (!\is_callable($method)) {
+                if (isset($method[0]) && \is_object($method[0])) {
+                    $method[0] = \get_class($method[0]);
                 }
                 throw new ConstraintDefinitionException(sprintf('%s targeted by Callback constraint is not a valid callable', json_encode($method)));
             }
 
-            call_user_func($method, $object, $this->context, $constraint->payload);
+            \call_user_func($method, $object, $this->context, $constraint->payload);
         } elseif (null !== $object) {
             if (!method_exists($object, $method)) {
-                throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist in class %s', $method, get_class($object)));
+                throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist in class %s', $method, \get_class($object)));
             }
 
             $reflMethod = new \ReflectionMethod($object, $method);