TwigLoaderPass::process()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
namespace Admingenerator\GeneratorBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
8
class TwigLoaderPass implements CompilerPassInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function process(ContainerBuilder $container)
14
    {
15
        if ($container->hasDefinition('twig.loader.filesystem')) {
16
            $container
17
                ->getDefinition('twig.loader.filesystem')
18
                ->addMethodCall('addPath', array($container->getParameter('kernel.cache_dir')));
19
        }
20
    }
21
}
22