YokaiEnumBundle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

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