PuliBundle::build()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 8
ccs 5
cts 5
cp 1
crap 2
rs 9.4285
1
<?php
2
3
/*
4
 * This file is part of the puli/symfony-bundle package.
5
 *
6
 * (c) Bernhard Schussek <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Puli\SymfonyBundle;
13
14
use Puli\SymfonyBundle\DependencyInjection\Compiler\TwigLoaderPass;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
use Symfony\Component\HttpKernel\Bundle\Bundle;
17
18
/**
19
 * @since  1.0
20
 *
21
 * @author Bernhard Schussek <[email protected]>
22
 */
23
class PuliBundle extends Bundle
24
{
25 3
    public function build(ContainerBuilder $container)
26
    {
27 3
        parent::build($container);
28
29 3
        if (class_exists('Puli\TwigExtension\PuliExtension')) {
30 3
            $container->addCompilerPass(new TwigLoaderPass());
31
        }
32 3
    }
33
}
34