X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FTabCompletion%2FMatcher%2FMongoClientMatcher.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FTabCompletion%2FMatcher%2FMongoClientMatcher.php;h=fb51bf7d2797a226085fb7c6738a50ed196702d9;hp=eb15f15c262cc4d6a604e230b2133dbeb12a9ce7;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php index eb15f15c2..fb51bf7d2 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php @@ -27,13 +27,13 @@ class MongoClientMatcher extends AbstractContextAwareMatcher { $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 \MongoClient) { @@ -42,8 +42,8 @@ class MongoClientMatcher extends AbstractContextAwareMatcher $list = $object->listDBs(); - return array_filter( - array_map(function ($info) { + return \array_filter( + \array_map(function ($info) { return $info['name']; }, $list['databases']), function ($var) use ($input) { @@ -57,8 +57,8 @@ class MongoClientMatcher extends AbstractContextAwareMatcher */ 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):