| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2.004 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | 3 | public function __construct($command, $output, $returnCode) |
|
| 11 | { |
||
| 12 | 3 | $this->command = $command; |
|
| 13 | 3 | $this->output = $output; |
|
| 14 | 3 | $this->returnCode = $returnCode; |
|
| 15 | |||
| 16 | 3 | if ($this->returnCode == 127) { |
|
| 17 | 3 | $message = 'Command not found: "' . $this->getCommand() . '"'; |
|
| 18 | 3 | } else { |
|
| 19 | $message = 'Command "' . $this->getCommand() . '" exited with code ' . $this->getReturnCode() . ': ' . $this->getOutput(); |
||
| 20 | } |
||
| 21 | |||
| 22 | 3 | parent::__construct($message); |
|
| 23 | 3 | } |
|
| 24 | |||
| 40 |