| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 3 | public function run(string $cmd, array $acceptableExitCodes = [0]) : Result |
|
| 35 | { |
||
| 36 | 3 | $process = new Process($cmd); |
|
|
|
|||
| 37 | 3 | $process->run(); |
|
| 38 | 3 | return new Result( |
|
| 39 | 3 | $cmd, |
|
| 40 | 3 | $process->getExitCode(), |
|
| 41 | 3 | $process->getOutput(), |
|
| 42 | 3 | $process->getErrorOutput(), |
|
| 43 | 3 | '', |
|
| 44 | $acceptableExitCodes |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: