protected function aliasesFor(Command $command): array
    {
        $aliases = [$name = $command->name()];

        foreach ($this->aliases as $alias => $command) {
            if (\in_array($name, [$alias, $command])) {
                $aliases[] = $alias;
                $aliases[] = $command;
            }
        }

        return $aliases;
    }
protected function aliasesFor(Command $command): array
    {
        $aliases = [$name = $command->name()];

        foreach ($this->aliases as $alias => $command) {
            if (\in_array($name, [$alias, $command])) {
                $aliases[] = $alias;
                $aliases[] = $command;
            }
        }

        return $aliases;
    }
protected function aliasesFor ( Command $ command ) : array { $ aliases = [ $ name = $ command -> name ( ) ] ; foreach ( $ this -> aliases as $ alias => $ command ) { if ( \ in_array ( $ name , [ $ alias , $ command ] ) ) { $ aliases [ ] = $ alias ; $ aliases [ ] = $ command ; } } return $ aliases ; }
Get aliases for given command.

@param Command $command

@return array
Get aliases for given command .