src/Console/CommandTrait.php
public function getCommand($command): Command
    {
        if (isset($this->aliases[$command])) {
            return $this->aliases[$command];
        }

        if (isset($this->commands[$command])) {
            return $this->commands[$command];
        }

        throw new CommandNotFoundException($this, $command);
    }
public function getCommand($command): Command
    {
        if (isset($this->aliases[$command])) {
            return $this->aliases[$command];
        }

        if (isset($this->commands[$command])) {
            return $this->commands[$command];
        }

        throw new CommandNotFoundException($this, $command);
    }
public function getCommand ( $ command ) : Command { if ( isset ( $ this -> aliases [ $ command ] ) ) { return $ this -> aliases [ $ command ] ; } if ( isset ( $ this -> commands [ $ command ] ) ) { return $ this -> commands [ $ command ] ; } throw new CommandNotFoundException ( $ this , $ command ) ; }
Get subcommand object from current command
by command name.

@param string $command

@return Command initialized command object.
@throws CommandNotFoundException
Get subcommand object from current command by command name .