Passed
Branch master (046a17)
by Mathieu
02:22
created

SonataAnnotationBundle   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 7
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Neimheadh\SonataAnnotationBundle;
6
7
use Neimheadh\SonataAnnotationBundle\DependencyInjection\Compiler\AccessCompilerPass;
8
use Neimheadh\SonataAnnotationBundle\DependencyInjection\Compiler\AddChildCompilerPass;
9
use Neimheadh\SonataAnnotationBundle\DependencyInjection\Compiler\AutoRegisterCompilerPass;
10
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
11
use Symfony\Component\DependencyInjection\ContainerBuilder;
12
use Symfony\Component\HttpKernel\Bundle\Bundle;
13
14
/**
15
 * @author Marko Kunic <[email protected]>
16
 */
17
final class SonataAnnotationBundle extends Bundle
18
{
19
    public function build(ContainerBuilder $container): void
20
    {
21
        $container->addCompilerPass(new AutoRegisterCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 1);
22
        $container->addCompilerPass(new AccessCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1);
23
        $container->addCompilerPass(new AddChildCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1);
24
    }
25
}
26