Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 3 | public function process(ContainerBuilder $container) |
|
18 | { |
||
19 | 3 | if (!$container->hasDefinition('zenstruck_object_routing.router')) { |
|
20 | 1 | return; |
|
21 | } |
||
22 | |||
23 | 2 | $definition = $container->getDefinition('zenstruck_object_routing.router'); |
|
24 | 2 | $taggedServices = $container->findTaggedServiceIds('zenstruck_object_routing.object_transformer'); |
|
25 | |||
26 | 2 | foreach ($taggedServices as $id => $attributes) { |
|
27 | 2 | $definition->addMethodCall('addTransformer', array(new Reference($id))); |
|
28 | } |
||
29 | 2 | } |
|
30 | } |
||
31 |