Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
46 | 2 | public function execute(TaskExecutionInterface $execution) |
|
47 | { |
||
48 | 2 | $process = ProcessBuilder::create( |
|
49 | 2 | [$this->consolePath, 'task:execute', $execution->getUuid(), '-e ' . $this->environment] |
|
50 | 2 | )->getProcess(); |
|
51 | |||
52 | 2 | $process->run(); |
|
53 | |||
54 | 2 | if (!$process->isSuccessful()) { |
|
55 | 1 | throw new SeparateProcessException($process->getErrorOutput()); |
|
56 | } |
||
57 | |||
58 | 1 | return $process->getOutput(); |
|
59 | } |
||
60 | } |
||
61 |