| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function process(ContainerBuilder $container) |
||
| 25 | { |
||
| 26 | $twig = $this->getDefinitionIfExists($container, 'twig'); |
||
| 27 | $methodCalls = $twig->getMethodCalls(); |
||
| 28 | foreach ($twig->getMethodCalls() as $key => $references) { |
||
| 29 | if ('addExtension' === $references[0] && 'hateoas.twig.link' === $references[1][0]->__toString()) { |
||
| 30 | unset($methodCalls[$key]); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | $twig->setMethodCalls($methodCalls); |
||
| 34 | $hateoas = $this->getDefinitionIfExists($container, 'hateoas.twig.link'); |
||
| 35 | $hateoas->clearTags(); |
||
| 36 | $container->removeDefinition('hateoas.twig.link'); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |