diff vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 5fb285c0d0e3
children 129ea1e6d783
line wrap: on
line diff
--- a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php	Thu Apr 26 11:26:54 2018 +0100
+++ b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php	Tue Jul 10 15:07:59 2018 +0100
@@ -86,6 +86,10 @@
             [self::T_NS_SEPARATOR, self::T_STRING],
             $token = array_pop($tokens)
         )) {
+            if (self::needCompleteClass($token)) {
+                continue;
+            }
+
             $class = $token[1] . $class;
         }
 
@@ -167,6 +171,11 @@
         return strpos(self::MISC_OPERATORS, $token) !== false;
     }
 
+    public static function needCompleteClass($token)
+    {
+        return in_array($token[1], ['doc', 'ls', 'show']);
+    }
+
     /**
      * Check whether $token type is present in $coll.
      *