protected function runCommandInForeground(): int
    {
        $this->callBeforeCallbacks();

        $process = Process::fromShellCommandline(
            \trim($this->buildCommand(), ' &'),
            $this->path,
            null,
            null,
            null
        );

        $run = $process->run();

        $this->callAfterCallbacks();

        return $run;
    }
protected function runCommandInForeground(): int
    {
        $this->callBeforeCallbacks();

        $process = Process::fromShellCommandline(
            \trim($this->buildCommand(), ' &'),
            $this->path,
            null,
            null,
            null
        );

        $run = $process->run();

        $this->callAfterCallbacks();

        return $run;
    }
protected function runCommandInForeground ( ) : int { $ this -> callBeforeCallbacks ( ) ; $ process = Process :: fromShellCommandline ( \ trim ( $ this -> buildCommand ( ) , ' &' ) , $ this -> path , null , null , null ) ; $ run = $ process -> run ( ) ; $ this -> callAfterCallbacks ( ) ; return $ run ; }
Run the command in the foreground.

@return int The exit status code
Run the command in the foreground .