protected function createProcess($args = null): Process
    {
        $command = $this->composeCommand($args);

        try {
            $process = $this->composeProcess($command);
        } catch (RuntimeException $e) {
            throw new ExternalProgramFailedException($command, $e->getMessage(), 0, $e);
        }

        return $process;
    }
protected function createProcess($args = null): Process
    {
        $command = $this->composeCommand($args);

        try {
            $process = $this->composeProcess($command);
        } catch (RuntimeException $e) {
            throw new ExternalProgramFailedException($command, $e->getMessage(), 0, $e);
        }

        return $process;
    }
protected function createProcess ( $ args = null ) : Process { $ command = $ this -> composeCommand ( $ args ) ; try { $ process = $ this -> composeProcess ( $ command ) ; } catch ( RuntimeException $ e ) { throw new ExternalProgramFailedException ( $ command , $ e -> getMessage ( ) , 0 , $ e ) ; } return $ process ; }
Create new instance of external program.

@param string|string[]|null $args Command arguments.

@return Process

@throws ExternalProgramFailedException
@throws InvalidArgumentException

@since 1.6
Create new instance of external program .