Passed
Branch master (a0cc06)
by Dāvis
17:06
created

SludioHelperBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of the SludioHelperBundle package.
5
 *
6
 * @author Dāvis Zālītis <[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 Sludio\HelperBundle;
13
14
use Sludio\HelperBundle\DependencyInjection\Compiler\TemplatingPass;
15
use Sludio\HelperBundle\DependencyInjection\SludioHelperExtension;
16
use Symfony\Component\DependencyInjection\ContainerBuilder;
17
use Symfony\Component\HttpKernel\Bundle\Bundle;
18
19
class SludioHelperBundle extends Bundle
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function build(ContainerBuilder $container)
25
    {
26
        parent::build($container);
27
        $container->addCompilerPass(new TemplatingPass());
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function getContainerExtension()
34
    {
35
        if ($this->extension === null) {
36
            return new SludioHelperExtension();
37
        }
38
39
        return $this->extension;
40
    }
41
}
42