Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / dependency-injection / Compiler / ServiceLocatorTagPass.php
index fb32d501ac29e0596a3ea1a005afad380b0cb600..5a0703e833583294055644f45609eaedaf16fcba 100644 (file)
@@ -37,7 +37,7 @@ final class ServiceLocatorTagPass extends AbstractRecursivePass
         }
 
         $arguments = $value->getArguments();
-        if (!isset($arguments[0]) || !is_array($arguments[0])) {
+        if (!isset($arguments[0]) || !\is_array($arguments[0])) {
             throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set.', $this->currentId));
         }
 
@@ -46,7 +46,7 @@ final class ServiceLocatorTagPass extends AbstractRecursivePass
                 continue;
             }
             if (!$v instanceof Reference) {
-                throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set, "%s" found for key "%s".', $this->currentId, is_object($v) ? get_class($v) : gettype($v), $k));
+                throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set, "%s" found for key "%s".', $this->currentId, \is_object($v) ? \get_class($v) : \gettype($v), $k));
             }
             $arguments[0][$k] = new ServiceClosureArgument($v);
         }
@@ -80,7 +80,7 @@ final class ServiceLocatorTagPass extends AbstractRecursivePass
     {
         foreach ($refMap as $id => $ref) {
             if (!$ref instanceof Reference) {
-                throw new InvalidArgumentException(sprintf('Invalid service locator definition: only services can be referenced, "%s" found for key "%s". Inject parameter values using constructors instead.', is_object($ref) ? get_class($ref) : gettype($ref), $id));
+                throw new InvalidArgumentException(sprintf('Invalid service locator definition: only services can be referenced, "%s" found for key "%s". Inject parameter values using constructors instead.', \is_object($ref) ? \get_class($ref) : \gettype($ref), $id));
             }
             $refMap[$id] = new ServiceClosureArgument($ref);
         }