芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/myvyralapp.com/bck/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php
*/ class VariablesMatcher extends AbstractContextAwareMatcher { /** * {@inheritdoc} */ public function getMatches(array $tokens, array $info = []): array { $var = \str_replace('$', '', $this->getInput($tokens)); return \array_filter(\array_keys($this->getVariables()), function ($variable) use ($var) { return AbstractMatcher::startsWith($var, $variable); }); } /** * {@inheritdoc} */ public function hasMatched(array $tokens): bool { $token = \array_pop($tokens); switch (true) { case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $token): case \is_string($token) && $token === '$': case self::isOperator($token): return true; } return false; } }