{
$names = [];
foreach ($commands as $command) {
- $names = array_merge([$command->getName()], $names);
- $names = array_merge($command->getAliases(), $names);
+ $names = \array_merge([$command->getName()], $names);
+ $names = \array_merge($command->getAliases(), $names);
}
$this->commands = $names;
}
*/
protected function isCommand($name)
{
- return in_array($name, $this->commands);
+ return \in_array($name, $this->commands);
}
/**
{
$input = $this->getInput($tokens);
- return array_filter($this->commands, function ($command) use ($input) {
+ return \array_filter($this->commands, function ($command) use ($input) {
return AbstractMatcher::startsWith($input, $command);
});
}
*/
public function hasMatched(array $tokens)
{
- /* $openTag */ array_shift($tokens);
- $command = array_shift($tokens);
+ /* $openTag */ \array_shift($tokens);
+ $command = \array_shift($tokens);
switch (true) {
case self::tokenIs($command, self::T_STRING) &&