Model/TopCommand.php
public function run()
    {
        $result = $this->getCommand()->run();

        if ($result->getExitCode() != 0) {
            throw new \RuntimeException(sprintf(
                'Command failed. Exit code %d, output %s',
                $result->getExitCode(),
                $result->getStdErr()));
        }

        return $this->parse($result->getStdOut());
    }
public function run()
    {
        $result = $this->getCommand()->run();

        if ($result->getExitCode() != 0) {
            throw new \RuntimeException(sprintf(
                'Command failed. Exit code %d, output %s',
                $result->getExitCode(),
                $result->getStdErr()));
        }

        return $this->parse($result->getStdOut());
    }
public function run ( ) { $ result = $ this -> getCommand ( ) -> run ( ) ; if ( $ result -> getExitCode ( ) != 0 ) { throw new \ RuntimeException ( sprintf ( 'Command failed. Exit code %d, output %s' , $ result -> getExitCode ( ) , $ result -> getStdErr ( ) ) ) ; } return $ this -> parse ( $ result -> getStdOut ( ) ) ; }
Run configured command

@return string
Run configured command