Mercurial > hg > isophonics-drupal-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
84 $class = ''; | 84 $class = ''; |
85 while (self::hasToken( | 85 while (self::hasToken( |
86 [self::T_NS_SEPARATOR, self::T_STRING], | 86 [self::T_NS_SEPARATOR, self::T_STRING], |
87 $token = array_pop($tokens) | 87 $token = array_pop($tokens) |
88 )) { | 88 )) { |
89 if (self::needCompleteClass($token)) { | |
90 continue; | |
91 } | |
92 | |
89 $class = $token[1] . $class; | 93 $class = $token[1] . $class; |
90 } | 94 } |
91 | 95 |
92 return $class; | 96 return $class; |
93 } | 97 } |
165 } | 169 } |
166 | 170 |
167 return strpos(self::MISC_OPERATORS, $token) !== false; | 171 return strpos(self::MISC_OPERATORS, $token) !== false; |
168 } | 172 } |
169 | 173 |
174 public static function needCompleteClass($token) | |
175 { | |
176 return in_array($token[1], ['doc', 'ls', 'show']); | |
177 } | |
178 | |
170 /** | 179 /** |
171 * Check whether $token type is present in $coll. | 180 * Check whether $token type is present in $coll. |
172 * | 181 * |
173 * @param array $coll A list of token types | 182 * @param array $coll A list of token types |
174 * @param mixed $token A PHP token (see token_get_all) | 183 * @param mixed $token A PHP token (see token_get_all) |