1 | <?php |
||
17 | class Json implements ParserInterface |
||
18 | { |
||
19 | /** |
||
20 | * {@inheritDoc} |
||
21 | * Parses an JSON file as an array |
||
22 | * |
||
23 | * @throws ParseException If there is an error parsing the JSON file |
||
24 | */ |
||
25 | 6 | public function parseFile($filename) |
|
30 | 3 | ||
31 | 3 | /** |
|
32 | 3 | * {@inheritDoc} |
|
33 | 1 | * Parses an JSON string as an array |
|
34 | * |
||
35 | * @throws ParseException If there is an error parsing the JSON string |
||
36 | 3 | */ |
|
37 | 3 | public function parseString($config) |
|
42 | |||
43 | 3 | /** |
|
44 | * Completes parsing of JSON data |
||
45 | * |
||
46 | * @param array $data |
||
47 | * @param strring $filename |
||
48 | * |
||
49 | 3 | * @throws ParseException If there is an error parsing the JSON data |
|
50 | */ |
||
51 | 3 | protected function parse($data = null, $filename = null) |
|
69 | |||
70 | /** |
||
71 | * {@inheritDoc} |
||
72 | */ |
||
73 | public static function getSupportedExtensions() |
||
77 | } |
||
78 |
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: