Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | 3 | public function __invoke(): Result |
|
34 | { |
||
35 | 3 | $this->process->run(); |
|
36 | |||
37 | 3 | if ($this->process->isSuccessful()) { |
|
38 | 2 | return Result::successful($this, $this->process->getOutput()); |
|
39 | } |
||
40 | |||
41 | 1 | return Result::failure( |
|
42 | 1 | $this, |
|
43 | 1 | "Exit {$this->process->getExitCode()}: {$this->process->getExitCodeText()}", |
|
44 | 1 | $this->process->getErrorOutput() |
|
45 | ); |
||
56 |