X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FTabCompletion%2FMatcher%2FVariablesMatcher.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FTabCompletion%2FMatcher%2FVariablesMatcher.php;h=a142b7b2e1348ae597427240fdedccedc0823b32;hp=2868525934109678686db62f1aef61a398c1d6c0;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php index 286852593..a142b7b2e 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php @@ -25,9 +25,9 @@ class VariablesMatcher extends AbstractContextAwareMatcher */ public function getMatches(array $tokens, array $info = []) { - $var = str_replace('$', '', $this->getInput($tokens)); + $var = \str_replace('$', '', $this->getInput($tokens)); - return array_filter(array_keys($this->getVariables()), function ($variable) use ($var) { + return \array_filter(\array_keys($this->getVariables()), function ($variable) use ($var) { return AbstractMatcher::startsWith($var, $variable); }); } @@ -37,11 +37,11 @@ class VariablesMatcher extends AbstractContextAwareMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); + $token = \array_pop($tokens); switch (true) { case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $token): - case is_string($token) && $token === '$': + case \is_string($token) && $token === '$': case self::isOperator($token): return true; }