| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function process(ContainerBuilder $containerBuilder): void |
||
| 17 | { |
||
| 18 | if (!$containerBuilder->has(DictionaryDataCollector::class)) { |
||
| 19 | return; |
||
| 20 | } |
||
| 21 | |||
| 22 | foreach (array_keys($containerBuilder->findTaggedServiceIds(DictionaryRegistrationPass::TAG_DICTIONARY)) as $id) { |
||
| 23 | $serviceId = \sprintf('%s.%s.traceable', $id, md5($id)); |
||
| 24 | $dictionary = new Reference(\sprintf('%s.inner', $serviceId)); |
||
| 25 | $traceable = new Definition(Traceable::class, [$dictionary, new Reference(DictionaryDataCollector::class)]); |
||
| 26 | |||
| 27 | $traceable->setDecoratedService($id); |
||
| 28 | |||
| 29 | $containerBuilder->setDefinition($serviceId, $traceable); |
||
| 30 | } |
||
| 33 |