Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function process(ContainerBuilder $container) |
||
30 | { |
||
31 | if (!$container->hasDefinition(GeocoderDataCollector::class)) { |
||
32 | return; |
||
33 | } |
||
34 | |||
35 | $dataCollector = $container->getDefinition(GeocoderDataCollector::class); |
||
36 | |||
37 | foreach ($container->findTaggedServiceIds('bazinga_geocoder.provider') as $providerId => $attributes) { |
||
38 | $container->register($providerId.'.debug', ProfilingProvider::class) |
||
39 | ->setDecoratedService($providerId) |
||
40 | ->setArguments([ |
||
41 | new Reference($providerId.'.debug.inner'), |
||
42 | ]); |
||
43 | $dataCollector->addMethodCall('addInstance', [new Reference($providerId)]); |
||
44 | } |
||
45 | } |
||
46 | } |
||
47 |