TwigPass::process()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
ccs 5
cts 5
cp 1
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Goetas\TwitalBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
8
/**
9
 *
10
 * @author Martin Hasoň <[email protected]>
11
 *
12
 */
13
class TwigPass implements CompilerPassInterface
14
{
15 7
    public function process(ContainerBuilder $container)
16
    {
17 7
        $twitalLoader = $container->getDefinition('twital.loader');
18 7
        $twitalLoader->replaceArgument(0, $container->findDefinition('twig.loader'));
19 7
        $container->setDefinition('twig.loader', $twitalLoader);
20 7
    }
21
}
22
23