| Conditions | 2 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 1 | public function whyCantExecuteCommand(Command $command) |
|
| 36 | { |
||
| 37 | 1 | $unknownErrors = $this->commandValidator->validateCommand($command); |
|
| 38 | |||
| 39 | 1 | $validatorErrors = array_map(function ($error) { |
|
| 40 | 1 | if (!($error instanceof \Throwable)) { |
|
| 41 | 1 | $error = new \Exception((string)$error); |
|
| 42 | } |
||
| 43 | |||
| 44 | 1 | return $error; |
|
| 45 | 1 | }, $unknownErrors); |
|
| 46 | |||
| 47 | $testerErrors = $this->commandTester->whyCantExecuteCommand($command); |
||
| 48 | |||
| 49 | return array_merge($validatorErrors, $testerErrors); |
||
| 50 | } |
||
| 51 | } |