src/Task/AbstractCliSpawningTask.php
protected function runProcess(Process $process)
    {
        $ioHandler = $this->getIO();
        $process->run(
            function ($pipe, $content) use ($ioHandler) {
                if (Process::ERR === $pipe) {
                    $ioHandler->writeError($content, false);
                    // @codingStandardsIgnoreStart
                    return;
                    // @codingStandardsIgnoreEnd
                }
                $ioHandler->write($content, false);
            }
        );

        if (0 !== $process->getExitCode()) {
            throw new ProcessFailedException($process);
        }
    }
protected function runProcess(Process $process)
    {
        $ioHandler = $this->getIO();
        $process->run(
            function ($pipe, $content) use ($ioHandler) {
                if (Process::ERR === $pipe) {
                    $ioHandler->writeError($content, false);
                    // @codingStandardsIgnoreStart
                    return;
                    // @codingStandardsIgnoreEnd
                }
                $ioHandler->write($content, false);
            }
        );

        if (0 !== $process->getExitCode()) {
            throw new ProcessFailedException($process);
        }
    }
protected function runProcess ( Process $ process ) { $ ioHandler = $ this -> getIO ( ) ; $ process -> run ( function ( $ pipe , $ content ) use ( $ ioHandler ) { if ( Process :: ERR === $ pipe ) { $ ioHandler -> writeError ( $ content , false ) ; // @codingStandardsIgnoreStart return ; // @codingStandardsIgnoreEnd } $ ioHandler -> write ( $ content , false ) ; } ) ; if ( 0 !== $ process -> getExitCode ( ) ) { throw new ProcessFailedException ( $ process ) ; } }
Run a process and throw exception if it failed.

@param Process $process The process to run.

@return void

@throws ProcessFailedException When the process returned a non zero result.
Run a process and throw exception if it failed .