1 | <?php |
||
18 | class Properties implements ParserInterface |
||
19 | { |
||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | * Parses a Properties file as an array. |
||
23 | */ |
||
24 | public function parseFile($filename) |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | * Parses a Properties string as an array. |
||
32 | */ |
||
33 | public function parseString($config) |
||
37 | |||
38 | private function parse($txtProperties) |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public static function getSupportedExtensions() |
||
62 | } |
||
63 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.