| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function process(ContainerBuilder $container): void |
||
| 32 | { |
||
| 33 | // Si le Renderer Twig n'existe pas, on ne fait rien |
||
| 34 | if (!$container->has('Cecil\Renderer\Twig')) { |
||
| 35 | return; |
||
| 36 | } |
||
| 37 | |||
| 38 | $definition = $container->findDefinition('Cecil\Renderer\Twig'); |
||
| 39 | $taggedServices = $container->findTaggedServiceIds('cecil.twig.extension'); |
||
| 40 | |||
| 41 | // Enregistrement des extensions Twig |
||
| 42 | foreach ($taggedServices as $id => $tags) { |
||
| 43 | $definition->addMethodCall('addExtension', [ |
||
| 44 | new Reference($id) |
||
| 45 | ]); |
||
| 49 |