Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / psy / psysh / src / Context.php
index c0e58e89b17f246d1bcf8ba9d8f9a68bf19d11d1..104dc8ffa6b3ce3028e1c4590fdc36f9706d2106 100644 (file)
@@ -75,13 +75,13 @@ class Context
             case '__file':
             case '__line':
             case '__dir':
-                if (array_key_exists($name, $this->commandScopeVariables)) {
+                if (\array_key_exists($name, $this->commandScopeVariables)) {
                     return $this->commandScopeVariables[$name];
                 }
                 break;
 
             default:
-                if (array_key_exists($name, $this->scopeVariables)) {
+                if (\array_key_exists($name, $this->scopeVariables)) {
                     return $this->scopeVariables[$name];
                 }
                 break;
@@ -97,7 +97,7 @@ class Context
      */
     public function getAll()
     {
-        return array_merge($this->scopeVariables, $this->getSpecialVariables());
+        return \array_merge($this->scopeVariables, $this->getSpecialVariables());
     }
 
     /**
@@ -123,7 +123,7 @@ class Context
             $vars['this'] = $this->boundObject;
         }
 
-        return array_merge($vars, $this->commandScopeVariables);
+        return \array_merge($vars, $this->commandScopeVariables);
     }
 
     /**
@@ -228,7 +228,7 @@ class Context
      */
     public function setBoundObject($boundObject)
     {
-        $this->boundObject = is_object($boundObject) ? $boundObject : null;
+        $this->boundObject = \is_object($boundObject) ? $boundObject : null;
         $this->boundClass = null;
     }
 
@@ -251,7 +251,7 @@ class Context
      */
     public function setBoundClass($boundClass)
     {
-        $this->boundClass = (is_string($boundClass) && $boundClass !== '') ? $boundClass : null;
+        $this->boundClass = (\is_string($boundClass) && $boundClass !== '') ? $boundClass : null;
         $this->boundObject = null;
     }
 
@@ -275,7 +275,7 @@ class Context
         $vars = [];
         foreach ($commandScopeVariables as $key => $value) {
             // kind of type check
-            if (is_scalar($value) && in_array($key, self::$commandScopeNames)) {
+            if (\is_scalar($value) && \in_array($key, self::$commandScopeNames)) {
                 $vars[$key] = $value;
             }
         }
@@ -303,7 +303,7 @@ class Context
      */
     public function getUnusedCommandScopeVariableNames()
     {
-        return array_diff(self::$commandScopeNames, array_keys($this->commandScopeVariables));
+        return \array_diff(self::$commandScopeNames, \array_keys($this->commandScopeVariables));
     }
 
     /**
@@ -315,6 +315,6 @@ class Context
      */
     public static function isSpecialVariableName($name)
     {
-        return in_array($name, self::$specialNames) || in_array($name, self::$commandScopeNames);
+        return \in_array($name, self::$specialNames) || \in_array($name, self::$commandScopeNames);
     }
 }