Completed
Push — master ( 8413a9...d75c00 )
by Narcotic
10:07
created

GravitonGeneratorBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 10
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 6
nc 1
nop 1
crap 1
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
     *
26
     * @return \Symfony\Component\HttpKernel\Bundle\Bundle[]
27
     */
28 18
    public function getBundles()
29
    {
30 18
        return [];
31
    }
32
33
    /**
34
     * load compiler pass
35
     *
36
     * @param ContainerBuilder $container container builder
37
     *
38
     * @return void
39
     */
40 2
    public function build(ContainerBuilder $container)
41
    {
42 2
        parent::build($container);
43
44 2
        $container->addCompilerPass(
45 2
            new GeneratorHashCompilerPass(),
46 2
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
47 2
            50
48
        );
49 2
    }
50
}
51