Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | 11 | private function ensureFileExists($multiCsJsonFile) |
|
44 | { |
||
45 | 11 | if (!file_exists($multiCsJsonFile)) { |
|
46 | throw new MultiCsFileNotFoundException( |
||
47 | sprintf( |
||
48 | 'File "multi-cs.json" was not found in "%s". Did you forget to create it?', |
||
49 | realpath(dirname($multiCsJsonFile)).'/'.basename($multiCsJsonFile) |
||
50 | ) |
||
51 | ); |
||
52 | } |
||
53 | 11 | } |
|
54 | } |
||
55 |
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: