| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3.0123 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 34 | public function process(ContainerBuilder $container) |
|
| 30 | { |
||
| 31 | 34 | if (!$container->hasDefinition(ProviderAggregator::class)) { |
|
| 32 | return; |
||
| 33 | } |
||
| 34 | |||
| 35 | 34 | $providers = []; |
|
| 36 | 34 | foreach ($container->findTaggedServiceIds('bazinga_geocoder.provider') as $providerId => $attributes) { |
|
| 37 | 32 | $providers[] = new Reference($providerId); |
|
| 38 | } |
||
| 39 | |||
| 40 | 34 | $geocoderDefinition = $container->getDefinition(ProviderAggregator::class); |
|
| 41 | 34 | $geocoderDefinition->addMethodCall('registerProviders', [$providers]); |
|
| 42 | 34 | } |
|
| 43 | } |
||
| 44 |