| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function process(ContainerBuilder $container) |
||
| 17 | { |
||
| 18 | if (!$container->has('lag.admin.data_providers_factory')) { |
||
| 19 | return; |
||
| 20 | } |
||
| 21 | |||
| 22 | $definition = $container->findDefinition('lag.admin.data_providers_factory'); |
||
| 23 | $taggedServices = $container->findTaggedServiceIds('data_provider'); |
||
| 24 | |||
| 25 | foreach ($taggedServices as $id => $tags) { |
||
| 26 | $definition->addMethodCall( |
||
| 27 | 'addDataProvider', |
||
| 28 | [ |
||
| 29 | $id, |
||
| 30 | new Reference($id), |
||
| 31 | ] |
||
| 32 | ); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 |