Code Duplication    Length = 8-9 lines in 2 locations

src/ScriptRuntime/Execution/ProcessExecutor.php 2 locations

@@ 110-118 (lines=9) @@
107
                }
108
109
                break;
110
            case $command instanceof SynchronusProcessCommand:
111
                $parsedCommand = $this->getParsedShellCommand($command);
112
                $process = $this->environment->createProcess($parsedCommand);
113
                $this->setProcessDefaults($process, $command->isTTy());
114
                $this->logSynchronousProcessStart($command, $index, $totalCount, $parsedCommand);
115
                $this->runProcess($process);
116
                $this->testProcessResultValid($process, $command->isIgnoreError());
117
118
                break;
119
            case $command instanceof DeferredProcessCommand:
120
                $parsedCommand = $this->getParsedShellCommand($command);
121
                $process = $this->environment->createProcess($parsedCommand);
@@ 119-126 (lines=8) @@
116
                $this->testProcessResultValid($process, $command->isIgnoreError());
117
118
                break;
119
            case $command instanceof DeferredProcessCommand:
120
                $parsedCommand = $this->getParsedShellCommand($command);
121
                $process = $this->environment->createProcess($parsedCommand);
122
                $this->setProcessDefaults($process, $command->isTTy());
123
                $this->logDeferedStart($command, $index, $totalCount, $parsedCommand);
124
                $this->deferProcess($parsedCommand, $command, $process);
125
126
                break;
127
            case $command instanceof TemplateCommand:
128
                $template = $command->createTemplate();
129
                $this->logTemplateStart($command, $index, $totalCount, $template);