X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FContext.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FContext.php;h=104dc8ffa6b3ce3028e1c4590fdc36f9706d2106;hp=c0e58e89b17f246d1bcf8ba9d8f9a68bf19d11d1;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/psy/psysh/src/Context.php b/vendor/psy/psysh/src/Context.php index c0e58e89b..104dc8ffa 100644 --- a/vendor/psy/psysh/src/Context.php +++ b/vendor/psy/psysh/src/Context.php @@ -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); } }