src/Console/BaseCommand.php
protected function parseArguments()
    {
        $this->parseConnection($this->option('connection'));

        if ($this->option('host')) {
            $this->host = $this->option('host');
        }

        if ($this->option('port')) {
            $this->port = (int) $this->option('port');
        }

        $this->parseCommandArguments();
    }
protected function parseArguments()
    {
        $this->parseConnection($this->option('connection'));

        if ($this->option('host')) {
            $this->host = $this->option('host');
        }

        if ($this->option('port')) {
            $this->port = (int) $this->option('port');
        }

        $this->parseCommandArguments();
    }
Generic logic for reading ang validating command's arguments and options.