Mercurial > hg > cmmr2012-drupal-site
diff vendor/psy/psysh/src/Context.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/vendor/psy/psysh/src/Context.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/psy/psysh/src/Context.php Thu Feb 28 13:11:55 2019 +0000 @@ -75,13 +75,13 @@ 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 @@ */ public function getAll() { - return array_merge($this->scopeVariables, $this->getSpecialVariables()); + return \array_merge($this->scopeVariables, $this->getSpecialVariables()); } /** @@ -123,7 +123,7 @@ $vars['this'] = $this->boundObject; } - return array_merge($vars, $this->commandScopeVariables); + return \array_merge($vars, $this->commandScopeVariables); } /** @@ -228,7 +228,7 @@ */ 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 @@ */ 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 @@ $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 @@ */ 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 @@ */ 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); } }