Code Duplication    Length = 8-9 lines in 2 locations

src/ScriptRuntime/Execution/ProcessExecutor.php 2 locations

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