| Conditions | 6 |
| Paths | 10 |
| Total Lines | 29 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 6.0073 |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | 1 | public function process(ContainerBuilder $container) |
|
| 15 | { |
||
| 16 | 1 | if (!$container->hasDefinition('kunstmaan_fixtures.parser.parser')) { |
|
| 17 | return; |
||
| 18 | } |
||
| 19 | |||
| 20 | 1 | $definition = $container->getDefinition('kunstmaan_fixtures.parser.parser'); |
|
| 21 | 1 | $taggedServices = $container->findTaggedServiceIds('kunstmaan_fixtures.parser.property'); |
|
| 22 | |||
| 23 | 1 | foreach ($taggedServices as $id => $tagAttributes) { |
|
| 24 | 1 | foreach ($tagAttributes as $attributes) { |
|
| 25 | 1 | $definition->addMethodCall( |
|
| 26 | 1 | 'addParser', |
|
| 27 | 1 | array(new Reference($id), $attributes['alias']) |
|
| 28 | ); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | 1 | $taggedServices = $container->findTaggedServiceIds('kunstmaan_fixtures.parser.spec'); |
|
| 33 | |||
| 34 | 1 | foreach ($taggedServices as $id => $tagAttributes) { |
|
| 35 | 1 | foreach ($tagAttributes as $attributes) { |
|
| 36 | 1 | $definition->addMethodCall( |
|
| 37 | 1 | 'addSpecParser', |
|
| 38 | 1 | array(new Reference($id), $attributes['alias']) |
|
| 39 | ); |
||
| 40 | } |
||
| 41 | } |
||
| 42 | 1 | } |
|
| 43 | } |
||
| 44 |