X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FPsy%2FTabCompletion%2FMatcher%2FConstantsMatcher.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FPsy%2FTabCompletion%2FMatcher%2FConstantsMatcher.php;h=0000000000000000000000000000000000000000;hp=885941e5cb3308108812feaed03d01e0c11b0927;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ConstantsMatcher.php b/vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ConstantsMatcher.php deleted file mode 100644 index 885941e5c..000000000 --- a/vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ConstantsMatcher.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -class ConstantsMatcher extends AbstractMatcher -{ - /** - * {@inheritdoc} - */ - public function getMatches(array $tokens, array $info = array()) - { - $const = $this->getInput($tokens); - - return array_filter(array_keys(get_defined_constants()), function ($constant) use ($const) { - return AbstractMatcher::startsWith($const, $constant); - }); - } - - /** - * {@inheritdoc} - */ - public function hasMatched(array $tokens) - { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); - - switch (true) { - case self::tokenIs($prevToken, self::T_NEW): - case self::tokenIs($prevToken, self::T_NS_SEPARATOR): - return false; - case self::hasToken(array(self::T_OPEN_TAG, self::T_STRING), $token): - case self::isOperator($token): - return true; - } - - return false; - } -}