Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / psy / psysh / src / TabCompletion / Matcher / MongoClientMatcher.php
index eb15f15c262cc4d6a604e230b2133dbeb12a9ce7..fb51bf7d2797a226085fb7c6738a50ed196702d9 100644 (file)
@@ -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):