Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / psy / psysh / src / Command / ListCommand / VariableEnumerator.php
index 257ceac535639a50f4cc3f49ef69d9dfa24bc5f1..0586c203e6b6813dca3c3cd387ad35c0d5bc4ca0 100644 (file)
@@ -79,9 +79,9 @@ class VariableEnumerator extends Enumerator
     protected function getVariables($showAll)
     {
         $scopeVars = $this->context->getAll();
-        uksort($scopeVars, function ($a, $b) {
-            $aIndex = array_search($a, self::$specialNames);
-            $bIndex = array_search($b, self::$specialNames);
+        \uksort($scopeVars, function ($a, $b) {
+            $aIndex = \array_search($a, self::$specialNames);
+            $bIndex = \array_search($b, self::$specialNames);
 
             if ($aIndex !== false) {
                 if ($bIndex !== false) {
@@ -95,12 +95,12 @@ class VariableEnumerator extends Enumerator
                 return -1;
             }
 
-            return strnatcasecmp($a, $b);
+            return \strnatcasecmp($a, $b);
         });
 
         $ret = [];
         foreach ($scopeVars as $name => $val) {
-            if (!$showAll && in_array($name, self::$specialNames)) {
+            if (!$showAll && \in_array($name, self::$specialNames)) {
                 continue;
             }
 
@@ -126,7 +126,7 @@ class VariableEnumerator extends Enumerator
                 $fname = '$' . $name;
                 $ret[$fname] = [
                     'name'  => $fname,
-                    'style' => in_array($name, self::$specialNames) ? self::IS_PRIVATE : self::IS_PUBLIC,
+                    'style' => \in_array($name, self::$specialNames) ? self::IS_PRIVATE : self::IS_PUBLIC,
                     'value' => $this->presentRef($val),
                 ];
             }