Passed
Push — main ( 31ed5f...388aa0 )
by Thierry
12:07
created

FacadesBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Lagdo\Symfony\Facades;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\HttpKernel\Bundle\Bundle;
7
8
class FacadesBundle extends Bundle
9
{
10
    /**
11
     * @inheritdoc
12
     */
13
    public function boot()
14
    {
15
        parent::boot();
16
17
        Container::setContainer($this->container);
0 ignored issues
show
Bug introduced by
It seems like $this->container can also be of type null; however, parameter $container of Lagdo\Symfony\Facades\Container::setContainer() does only seem to accept Symfony\Component\Depend...tion\ContainerInterface, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

17
        Container::setContainer(/** @scrutinizer ignore-type */ $this->container);
Loading history...
18
    }
19
20
    /**
21
     * @inheritDoc
22
     */
23
    public function build(ContainerBuilder $container)
24
    {
25
        parent::build($container);
26
27
        $container->addCompilerPass(new DependencyInjection\Compiler\CompilerPass());
28
    }
29
}
30