Completed
Push — master ( 0c53bc...e1860c )
by Nikola
05:26
created

QueryResourcesLoaderBundle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 8

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 8
dl 0
loc 24
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainerExtension() 0 4 1
A build() 0 10 1
1
<?php
2
/*
3
 * This file is part of the QueryResourcesLoaderBundle, an RunOpenCode project.
4
 *
5
 * (c) 2017 RunOpenCode.
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace RunOpenCode\Bundle\QueryResourcesLoader;
11
12
use RunOpenCode\Bundle\QueryResourcesLoader\DependencyInjection\CompilerPass\ExecutorBuilderCompilerPass;
13
use RunOpenCode\Bundle\QueryResourcesLoader\DependencyInjection\CompilerPass\RegisterExecutorsCompilerPass;
14
use RunOpenCode\Bundle\QueryResourcesLoader\DependencyInjection\CompilerPass\TwigEnvironmentCompilerPass;
15
use RunOpenCode\Bundle\QueryResourcesLoader\DependencyInjection\CompilerPass\TwigExtensionsCompilerPass;
16
use RunOpenCode\Bundle\QueryResourcesLoader\DependencyInjection\CompilerPass\TwigLoaderCompilerPass;
17
use RunOpenCode\Bundle\QueryResourcesLoader\DependencyInjection\Extension;
18
use Symfony\Component\DependencyInjection\ContainerBuilder;
19
use Symfony\Component\HttpKernel\Bundle\Bundle;
20
21
/**
22
 * Class QueryResourcesLoaderBundle
23
 *
24
 * A bundle.
25
 *
26
 * @package RunOpenCode\Bundle\QueryResourcesLoader
27
 */
28
class QueryResourcesLoaderBundle extends Bundle
29
{
30
    /**
31
     * {@inheritdoc}
32
     */
33 1
    public function getContainerExtension()
34
    {
35 1
        return new Extension();
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41 1
    public function build(ContainerBuilder $container)
42
    {
43
        $container
44 1
            ->addCompilerPass(new TwigExtensionsCompilerPass())
45 1
            ->addCompilerPass(new TwigEnvironmentCompilerPass())
46 1
            ->addCompilerPass(new TwigLoaderCompilerPass())
47 1
            ->addCompilerPass(new ExecutorBuilderCompilerPass())
48 1
            ->addCompilerPass(new RegisterExecutorsCompilerPass())
49
        ;
50 1
    }
51
}
52