Completed
Pull Request — master (#13)
by Yann
10:37 queued 08:42
created

YokaiEnumBundle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 5
dl 0
loc 21
ccs 0
cts 11
cp 0
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 7 1
A getContainerExtension() 0 4 1
1
<?php
2
3
namespace Yokai\EnumBundle;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\HttpKernel\Bundle\Bundle;
7
use Yokai\EnumBundle\DependencyInjection\CompilerPass\ConventionedEnumCollectorCompilerPass;
8
use Yokai\EnumBundle\DependencyInjection\CompilerPass\TaggedEnumCollectorCompilerPass;
9
use Yokai\EnumBundle\DependencyInjection\EnumExtension;
10
11
/**
12
 * @author Yann Eugoné <[email protected]>
13
 */
14
class YokaiEnumBundle extends Bundle
15
{
16
    /**
17
     * @inheritdoc
18
     */
19
    public function build(ContainerBuilder $container)
20
    {
21
        $container
22
            ->addCompilerPass(new ConventionedEnumCollectorCompilerPass())
23
            ->addCompilerPass(new TaggedEnumCollectorCompilerPass)
24
        ;
25
    }
26
27
    /**
28
     * @inheritdoc
29
     */
30
    public function getContainerExtension()
31
    {
32
        return new EnumExtension;
33
    }
34
}
35