YokaiEnumBundle::getContainerExtension()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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