| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 28 | 6 | public function process(ContainerBuilder $container) |
|
| 29 | { |
||
| 30 | 6 | $fakerDefinition = $container->findDefinition('hautelook_alice.faker'); |
|
| 31 | 6 | $providerChainDefinition = $container->findDefinition('hautelook_alice.faker.provider_chain'); |
|
| 32 | |||
| 33 | 6 | $providersIds = $container->findTaggedServiceIds('hautelook_alice.faker.provider'); |
|
| 34 | 6 | $providers = []; |
|
| 35 | 6 | foreach ($providersIds as $providerId => $tags) { |
|
| 36 | 6 | $provider = new Reference($providerId); |
|
| 37 | |||
| 38 | 6 | $fakerDefinition->addMethodCall('addProvider', [$provider]); |
|
| 39 | 6 | $providers[] = $provider; |
|
| 40 | 6 | } |
|
| 41 | |||
| 42 | 6 | $providerChainDefinition->addArgument($providers); |
|
| 43 | 6 | } |
|
| 44 | } |
||
| 45 |