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

SludioHelperBundle   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 4 1
A getContainerExtension() 0 7 2
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