diff vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents c2387f117808
children af1871eacc83
line wrap: on
line diff
--- a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php	Thu Feb 28 13:21:36 2019 +0000
@@ -17,17 +17,17 @@
 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
 use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
+use Symfony\Component\DependencyInjection\Reference;
 use Symfony\Component\DependencyInjection\TypedReference;
-use Symfony\Component\DependencyInjection\Reference;
 
 /**
  * @author Guilhem Niot <guilhem.niot@gmail.com>
  */
 class ResolveBindingsPass extends AbstractRecursivePass
 {
-    private $usedBindings = array();
-    private $unusedBindings = array();
-    private $errorMessages = array();
+    private $usedBindings = [];
+    private $unusedBindings = [];
+    private $errorMessages = [];
 
     /**
      * {@inheritdoc}
@@ -48,9 +48,9 @@
                 throw new InvalidArgumentException($message);
             }
         } finally {
-            $this->usedBindings = array();
-            $this->unusedBindings = array();
-            $this->errorMessages = array();
+            $this->usedBindings = [];
+            $this->unusedBindings = [];
+            $this->errorMessages = [];
         }
     }
 
@@ -80,7 +80,7 @@
                 $this->usedBindings[$bindingId] = true;
                 unset($this->unusedBindings[$bindingId]);
             } elseif (!isset($this->usedBindings[$bindingId])) {
-                $this->unusedBindings[$bindingId] = array($key, $this->currentId);
+                $this->unusedBindings[$bindingId] = [$key, $this->currentId];
             }
 
             if (isset($key[0]) && '$' === $key[0]) {
@@ -88,7 +88,7 @@
             }
 
             if (null !== $bindingValue && !$bindingValue instanceof Reference && !$bindingValue instanceof Definition) {
-                throw new InvalidArgumentException(sprintf('Invalid value for binding key "%s" for service "%s": expected null, an instance of %s or an instance of %s, %s given.', $key, $this->currentId, Reference::class, Definition::class, gettype($bindingValue)));
+                throw new InvalidArgumentException(sprintf('Invalid value for binding key "%s" for service "%s": expected null, an instance of %s or an instance of %s, %s given.', $key, $this->currentId, Reference::class, Definition::class, \gettype($bindingValue)));
             }
         }
 
@@ -100,7 +100,7 @@
 
         try {
             if ($constructor = $this->getConstructor($value, false)) {
-                $calls[] = array($constructor, $value->getArguments());
+                $calls[] = [$constructor, $value->getArguments()];
             }
         } catch (RuntimeException $e) {
             $this->errorMessages[] = $e->getMessage();