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

YokaiEnumBundle::getContainerExtension()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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