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

GravitonGeneratorBundle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 30
rs 10
ccs 2
cts 2
cp 1

2 Methods

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