public function setCommands(array $commands)
    {
        $names = [];
        foreach ($commands as $command) {
            $names = \array_merge([$command->getName()], $names);
            $names = \array_merge($command->getAliases(), $names);
        }
        $this->commands = $names;
    }
public function setCommands(array $commands)
    {
        $names = [];
        foreach ($commands as $command) {
            $names = \array_merge([$command->getName()], $names);
            $names = \array_merge($command->getAliases(), $names);
        }
        $this->commands = $names;
    }
public function setCommands ( array $ commands ) { $ names = [ ] ; foreach ( $ commands as $ command ) { $ names = \ array_merge ( [ $ command -> getName ( ) ] , $ names ) ; $ names = \ array_merge ( $ command -> getAliases ( ) , $ names ) ; } $ this -> commands = $ names ; }
Set Commands for completion.

@param Command[] $commands
Set Commands for completion .