Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / psy / psysh / src / CodeCleaner / NamespaceAwarePass.php
similarity index 91%
rename from vendor/psy/psysh/src/Psy/CodeCleaner/NamespaceAwarePass.php
rename to vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php
index 4a76d0f644bc9d576baeb45842f31ec36808ce92..9b404450423405ea0de561542e97875d1b5aa304 100644 (file)
@@ -3,7 +3,7 @@
 /*
  * This file is part of Psy Shell.
  *
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -32,8 +32,8 @@ abstract class NamespaceAwarePass extends CodeCleanerPass
      */
     public function beforeTraverse(array $nodes)
     {
-        $this->namespace    = array();
-        $this->currentScope = array();
+        $this->namespace    = [];
+        $this->currentScope = [];
     }
 
     /**
@@ -45,7 +45,7 @@ abstract class NamespaceAwarePass extends CodeCleanerPass
     public function enterNode(Node $node)
     {
         if ($node instanceof Namespace_) {
-            $this->namespace = isset($node->name) ? $node->name->parts : array();
+            $this->namespace = isset($node->name) ? $node->name->parts : [];
         }
     }
 
@@ -63,7 +63,7 @@ abstract class NamespaceAwarePass extends CodeCleanerPass
         } elseif ($name instanceof Name) {
             $name = $name->parts;
         } elseif (!is_array($name)) {
-            $name = array($name);
+            $name = [$name];
         }
 
         return implode('\\', array_merge($this->namespace, $name));