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