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;
*/
public function getAll()
{
- return array_merge($this->scopeVariables, $this->getSpecialVariables());
+ return \array_merge($this->scopeVariables, $this->getSpecialVariables());
}
/**
$vars['this'] = $this->boundObject;
}
- return array_merge($vars, $this->commandScopeVariables);
+ return \array_merge($vars, $this->commandScopeVariables);
}
/**
*/
public function setBoundObject($boundObject)
{
- $this->boundObject = is_object($boundObject) ? $boundObject : null;
+ $this->boundObject = \is_object($boundObject) ? $boundObject : null;
$this->boundClass = null;
}
*/
public function setBoundClass($boundClass)
{
- $this->boundClass = (is_string($boundClass) && $boundClass !== '') ? $boundClass : null;
+ $this->boundClass = (\is_string($boundClass) && $boundClass !== '') ? $boundClass : null;
$this->boundObject = null;
}
$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;
}
}
*/
public function getUnusedCommandScopeVariableNames()
{
- return array_diff(self::$commandScopeNames, array_keys($this->commandScopeVariables));
+ return \array_diff(self::$commandScopeNames, \array_keys($this->commandScopeVariables));
}
/**
*/
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);
}
}