Code Duplication    Length = 10-11 lines in 2 locations

src/Common/ExecTrait.php 2 locations

@@ 317-327 (lines=11) @@
314
            $this->process->setEnv($this->env);
315
        }
316
317
        if (!$this->background && !$this->isPrinted) {
318
            $this->startTimer();
319
            $this->process->run();
320
            $this->stopTimer();
321
            $output = rtrim($this->process->getOutput());
322
            return new ResultData(
323
                $this->process->getExitCode(),
324
                $output,
325
                $this->getResultData()
326
            );
327
        }
328
329
        if (!$this->background && $this->isPrinted) {
330
            $this->startTimer();
@@ 329-338 (lines=10) @@
326
            );
327
        }
328
329
        if (!$this->background && $this->isPrinted) {
330
            $this->startTimer();
331
            $this->process->run($output_callback);
332
            $this->stopTimer();
333
            return new ResultData(
334
                $this->process->getExitCode(),
335
                $this->process->getOutput(),
336
                $this->getResultData()
337
            );
338
        }
339
340
        try {
341
            $this->process->start();