X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FTabCompletion%2FAutoCompleter.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FTabCompletion%2FAutoCompleter.php;h=0751aa78bf91cbec3b441e521117cef53718dc8e;hp=bf538106a651cfb28ac59d24714aad08982e047f;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php b/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php index bf538106a..0751aa78b 100644 --- a/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php +++ b/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php @@ -38,7 +38,7 @@ class AutoCompleter */ public function activate() { - readline_completion_function([&$this, 'callback']); + \readline_completion_function([&$this, 'callback']); } /** @@ -56,27 +56,27 @@ class AutoCompleter // try to work around it. $line = $info['line_buffer']; if (isset($info['end'])) { - $line = substr($line, 0, $info['end']); + $line = \substr($line, 0, $info['end']); } if ($line === '' && $input !== '') { $line = $input; } - $tokens = token_get_all('matchers as $matcher) { if ($matcher->hasMatched($tokens)) { - $matches = array_merge($matcher->getMatches($tokens), $matches); + $matches = \array_merge($matcher->getMatches($tokens), $matches); } } - $matches = array_unique($matches); + $matches = \array_unique($matches); return !empty($matches) ? $matches : ['']; } @@ -93,7 +93,7 @@ class AutoCompleter */ public function callback($input, $index) { - return $this->processCallback($input, $index, readline_info()); + return $this->processCallback($input, $index, \readline_info()); } /** @@ -103,10 +103,8 @@ class AutoCompleter { // PHP didn't implement the whole readline API when they first switched // to libedit. And they still haven't. - // - // So this is a thing to make PsySH work on 5.3.x: - if (function_exists('readline_callback_handler_remove')) { - readline_callback_handler_remove(); + if (\function_exists('readline_callback_handler_remove')) { + \readline_callback_handler_remove(); } } }