Conditions | 6 |
Paths | 15 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
20 | public function process(ContainerBuilder $container) |
||
21 | { |
||
22 | $extensions = []; |
||
23 | foreach ($container->findTaggedServiceIds('webuni_commonmark.extension') as $id => $tag) { |
||
24 | $alias = isset($tag[0]['alias']) ? $tag[0]['alias'] : $id; |
||
25 | $extensions[$alias] = $id; |
||
26 | } |
||
27 | |||
28 | if ($container->hasDefinition('webuni_commonmark.default_environment')) { |
||
29 | $definition = $container->getDefinition('webuni_commonmark.default_environment'); |
||
30 | foreach ($extensions as $alias => $id) { |
||
31 | $definition->addMethodCall('addExtension', [new Reference($id)]); |
||
32 | } |
||
33 | } |
||
34 | |||
35 | foreach ($container->findTaggedServiceIds('webuni_commonmark.environment.extensions') as $id => $tag) { |
||
|
|||
36 | // todo |
||
37 | } |
||
38 | } |
||
39 | } |
||
40 |
This check looks for
foreach
loops that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.Consider removing the loop.