Completed
Push — feature/try-update-symfony-32 ( f32603...80dbe1 )
by Narcotic
149:00 queued 83:23
created

GravitonGeneratorBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 0
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * bundle containing various code generators
4
 */
5
6
namespace Graviton\GeneratorBundle;
7
8
use Graviton\BundleBundle\GravitonBundleInterface;
9
use Graviton\GeneratorBundle\DependencyInjection\Compiler\GeneratorHashCompilerPass;
10
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
11
use Symfony\Component\DependencyInjection\ContainerBuilder;
12
use Symfony\Component\HttpKernel\Bundle\Bundle;
13
14
/**
15
 * bundle containing various code generators
16
 *
17
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
18
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
19
 * @link     http://swisscom.ch
20
 */
21
class GravitonGeneratorBundle extends Bundle implements GravitonBundleInterface
22
{
23
    /**
24
     * return array of new bunde instances
25 18
     *
26
     * @return \Symfony\Component\HttpKernel\Bundle\Bundle[]
27 18
     */
28
    public function getBundles()
29
    {
30
        return [];
31
    }
32
33
    /**
34
     * load compiler pass
35
     *
36
     * @param ContainerBuilder $container container builder
37
     *
38
     * @return void
39
     */
40
    public function build(ContainerBuilder $container)
41
    {
42
        parent::build($container);
43
44
        $container->addCompilerPass(
45
            new GeneratorHashCompilerPass(),
46
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
47
            50
48
        );
49
    }
50
}
51