Code Duplication    Length = 6-10 lines in 3 locations

src/Common/ExecTrait.php 2 locations

@@ 278-287 (lines=10) @@
275
            $this->process->setEnv($this->env);
276
        }
277
278
        if (!$this->background and !$this->isPrinted) {
279
            $this->startTimer();
280
            $this->process->run();
281
            $this->stopTimer();
282
            return new ResultData(
283
                $this->process->getExitCode(),
284
                $this->process->getOutput(),
285
                $this->getResultData()
286
            );
287
        }
288
289
        if (!$this->background and $this->isPrinted) {
290
            $this->startTimer();
@@ 289-298 (lines=10) @@
286
            );
287
        }
288
289
        if (!$this->background and $this->isPrinted) {
290
            $this->startTimer();
291
            $this->process->run($output_callback);
292
            $this->stopTimer();
293
            return new ResultData(
294
                $this->process->getExitCode(),
295
                $this->process->getOutput(),
296
                $this->getResultData()
297
            );
298
        }
299
300
        try {
301
            $this->process->start();

src/Task/Base/Exec.php 1 location

@@ 243-248 (lines=6) @@
240
            $this->process->setEnv($this->env);
241
        }
242
243
        if (!$this->background and !$this->isPrinted) {
244
            $this->startTimer();
245
            $this->process->run();
246
            $this->stopTimer();
247
            return new Result($this, $this->process->getExitCode(), $this->process->getOutput(), $this->getResultData());
248
        }
249
250
        if (!$this->background and $this->isPrinted) {
251
            $this->startTimer();