diff vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 5fb285c0d0e3
children
line wrap: on
line diff
--- a/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php	Thu Feb 28 13:21:36 2019 +0000
@@ -45,8 +45,8 @@
     {
         $names = [];
         foreach ($commands as $command) {
-            $names = array_merge([$command->getName()], $names);
-            $names = array_merge($command->getAliases(), $names);
+            $names = \array_merge([$command->getName()], $names);
+            $names = \array_merge($command->getAliases(), $names);
         }
         $this->commands = $names;
     }
@@ -60,7 +60,7 @@
      */
     protected function isCommand($name)
     {
-        return in_array($name, $this->commands);
+        return \in_array($name, $this->commands);
     }
 
     /**
@@ -88,7 +88,7 @@
     {
         $input = $this->getInput($tokens);
 
-        return array_filter($this->commands, function ($command) use ($input) {
+        return \array_filter($this->commands, function ($command) use ($input) {
             return AbstractMatcher::startsWith($input, $command);
         });
     }
@@ -98,8 +98,8 @@
      */
     public function hasMatched(array $tokens)
     {
-        /* $openTag */ array_shift($tokens);
-        $command = array_shift($tokens);
+        /* $openTag */ \array_shift($tokens);
+        $command = \array_shift($tokens);
 
         switch (true) {
             case self::tokenIs($command, self::T_STRING) &&