src/Console/Application.php
public function execute(...$arguments)
    {
        $options = $this->getOptions();
        if ($options->version) {
            $this->logger->writeln($this->name() . ' - ' . static::VERSION);
            $this->logger->writeln('console core: ' . static::CORE_VERSION);

            return;
        }

        // show list and help by default
        $help = $this->getCommand('help');
        $help->setOptions($options);
        if ($help || $options->help) {
            $help->executeWrapper($arguments);

            return;
        }

        throw new CommandNotFoundException($this, 'help');
    }
public function execute(...$arguments)
    {
        $options = $this->getOptions();
        if ($options->version) {
            $this->logger->writeln($this->name() . ' - ' . static::VERSION);
            $this->logger->writeln('console core: ' . static::CORE_VERSION);

            return;
        }

        // show list and help by default
        $help = $this->getCommand('help');
        $help->setOptions($options);
        if ($help || $options->help) {
            $help->executeWrapper($arguments);

            return;
        }

        throw new CommandNotFoundException($this, 'help');
    }
public function execute ( ... $ arguments ) { $ options = $ this -> getOptions ( ) ; if ( $ options -> version ) { $ this -> logger -> writeln ( $ this -> name ( ) . ' - ' . static :: VERSION ) ; $ this -> logger -> writeln ( 'console core: ' . static :: CORE_VERSION ) ; return ; } // show list and help by default $ help = $ this -> getCommand ( 'help' ) ; $ help -> setOptions ( $ options ) ; if ( $ help || $ options -> help ) { $ help -> executeWrapper ( $ arguments ) ; return ; } throw new CommandNotFoundException ( $ this , 'help' ) ; }
This method is the top logic of an application. when there is no
argument provided, we show help content by default.

@param array ...$arguments

@throws CommandNotFoundException
This method is the top logic of an application . when there is no argument provided we show help content by default .