Mercurial > hg > isophonics-drupal-site
diff vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 5fb285c0d0e3 |
children |
line wrap: on
line diff
--- a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php Thu Feb 28 13:21:36 2019 +0000 @@ -27,20 +27,20 @@ { $input = $this->getInput($tokens); - $firstToken = array_pop($tokens); + $firstToken = \array_pop($tokens); if (self::tokenIs($firstToken, self::T_STRING)) { // second token is the object operator - array_pop($tokens); + \array_pop($tokens); } - $objectToken = array_pop($tokens); - $objectName = str_replace('$', '', $objectToken[1]); + $objectToken = \array_pop($tokens); + $objectName = \str_replace('$', '', $objectToken[1]); $object = $this->getVariable($objectName); if (!$object instanceof \MongoDB) { return []; } - return array_filter( + return \array_filter( $object->getCollectionNames(), function ($var) use ($input) { return AbstractMatcher::startsWith($input, $var); @@ -53,8 +53,8 @@ */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::tokenIs($token, self::T_OBJECT_OPERATOR):