Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / psy / psysh / src / TabCompletion / Matcher / KeywordsMatcher.php
similarity index 82%
rename from vendor/psy/psysh/src/Psy/TabCompletion/Matcher/KeywordsMatcher.php
rename to vendor/psy/psysh/src/TabCompletion/Matcher/KeywordsMatcher.php
index 329271cf66a04afce14b2dbcf5552e36abeca8da..b576f82bb28c0dfd664a15ebc7e0dc4be5a408a2 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.
@@ -20,14 +20,14 @@ namespace Psy\TabCompletion\Matcher;
  */
 class KeywordsMatcher extends AbstractMatcher
 {
-    protected $keywords = array(
+    protected $keywords = [
         'array', 'clone', 'declare', 'die', 'echo', 'empty', 'eval', 'exit', 'include',
         'include_once', 'isset', 'list', 'print',  'require', 'require_once', 'unset',
-    );
+    ];
 
-    protected $mandatoryStartKeywords = array(
+    protected $mandatoryStartKeywords = [
         'die', 'echo', 'print', 'unset',
-    );
+    ];
 
     /**
      * Get all (completable) PHP keywords.
@@ -54,7 +54,7 @@ class KeywordsMatcher extends AbstractMatcher
     /**
      * {@inheritdoc}
      */
-    public function getMatches(array $tokens, array $info = array())
+    public function getMatches(array $tokens, array $info = [])
     {
         $input = $this->getInput($tokens);
 
@@ -72,9 +72,9 @@ class KeywordsMatcher extends AbstractMatcher
         $prevToken = array_pop($tokens);
 
         switch (true) {
-            case self::hasToken(array(self::T_OPEN_TAG, self::T_VARIABLE), $token):
+            case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $token):
 //            case is_string($token) && $token === '$':
-            case self::hasToken(array(self::T_OPEN_TAG, self::T_VARIABLE), $prevToken) &&
+            case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $prevToken) &&
                 self::tokenIs($token, self::T_STRING):
             case self::isOperator($token):
                 return true;