| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2.7462 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 1 | private function ensureFileExists(string $multiCsJsonFile) |
|
| 37 | { |
||
| 38 | 1 | if (!file_exists($multiCsJsonFile)) { |
|
| 39 | throw new MultiCsFileNotFoundException( |
||
| 40 | sprintf( |
||
| 41 | 'File "%s" was not found in "%s". Did you forget to create it?', |
||
| 42 | 'multi-cs.json', |
||
| 43 | realpath(dirname($multiCsJsonFile)).'/'.basename($multiCsJsonFile) |
||
| 44 | ) |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | 1 | } |
|
| 48 | } |
||
| 49 |
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: