Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public function prepend(ContainerBuilder $container) |
||
35 | { |
||
36 | $parser = new Parser(); |
||
37 | $config = $parser->parse(file_get_contents(__DIR__ . '/../Resources/config/config.yml')); |
||
38 | |||
39 | foreach ($config as $key => $configuration) { |
||
|
|||
40 | $container->prependExtensionConfig($key, $configuration); |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 |
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.