src/console/Command.php
public function run() {
        $this->input = new Input($this->docoptResult);
        $this->di()->set(Input::class, $this->input);

        if ($this->validator) $error = $this->validator->__invoke($this->input, $this->output);
        else                  $error = $this->validate($this->input, $this->output);

        if ($error)
            return $this->status = (int) $error;

        if ($this->task) $status = $this->task->__invoke($this->input, $this->output);
        else             $status = $this->execute($this->input, $this->output);

        return $this->status = (int) $status;
    }
public function run() {
        $this->input = new Input($this->docoptResult);
        $this->di()->set(Input::class, $this->input);

        if ($this->validator) $error = $this->validator->__invoke($this->input, $this->output);
        else                  $error = $this->validate($this->input, $this->output);

        if ($error)
            return $this->status = (int) $error;

        if ($this->task) $status = $this->task->__invoke($this->input, $this->output);
        else             $status = $this->execute($this->input, $this->output);

        return $this->status = (int) $status;
    }
public function run ( ) { $ this -> input = new Input ( $ this -> docoptResult ) ; $ this -> di ( ) -> set ( Input :: class , $ this -> input ) ; if ( $ this -> validator ) $ error = $ this -> validator -> __invoke ( $ this -> input , $ this -> output ) ; else $ error = $ this -> validate ( $ this -> input , $ this -> output ) ; if ( $ error ) return $ this -> status = ( int ) $ error ; if ( $ this -> task ) $ status = $ this -> task -> __invoke ( $ this -> input , $ this -> output ) ; else $ status = $ this -> execute ( $ this -> input , $ this -> output ) ; return $ this -> status = ( int ) $ status ; }
Trigger execution of the command.

@return int - execution status (0 for success)
Trigger execution of the command .