Command/CliCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        try {
            $this->doPreExecute($input, $output);
            $this->returnCode = $this->doExecute($input, $output);
            $this->doPostExecute($input, $output);
        } catch(Exception $e) {
            $this->returnCode = static::RETURN_ERROR;
            throw $e;
        }

        return $this->returnCode;
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        try {
            $this->doPreExecute($input, $output);
            $this->returnCode = $this->doExecute($input, $output);
            $this->doPostExecute($input, $output);
        } catch(Exception $e) {
            $this->returnCode = static::RETURN_ERROR;
            throw $e;
        }

        return $this->returnCode;
    }
protected function execute ( InputInterface $ input , OutputInterface $ output ) { try { $ this -> doPreExecute ( $ input , $ output ) ; $ this -> returnCode = $ this -> doExecute ( $ input , $ output ) ; $ this -> doPostExecute ( $ input , $ output ) ; } catch ( Exception $ e ) { $ this -> returnCode = static :: RETURN_ERROR ; throw $ e ; } return $ this -> returnCode ; }
Execute command.

@param InputInterface $input
Input.
@param OutputInterface $output
Output.

@return int
Return Code.
Execute command .