Passed
Push — master ( 14db2b...b42c42 )
by Kevin
02:47
created

ZenstruckFoundryBundle::boot()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2.0625

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 0
dl 0
loc 4
ccs 3
cts 4
cp 0.75
crap 2.0625
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Zenstruck\Foundry\Bundle;
4
5
use Symfony\Component\HttpKernel\Bundle\Bundle;
6
use Zenstruck\Foundry\Configuration;
7
use Zenstruck\Foundry\Factory;
8
9
/**
10
 * @author Kevin Bond <[email protected]>
11
 */
12
final class ZenstruckFoundryBundle extends Bundle
13
{
14 118
    public function boot()
15
    {
16 118
        if (!Factory::isBooted()) {
17 2
            Factory::boot($this->container->get(Configuration::class));
0 ignored issues
show
Bug introduced by
It seems like $this->container->get(Ze...y\Configuration::class) can also be of type null; however, parameter $configuration of Zenstruck\Foundry\Factory::boot() does only seem to accept Zenstruck\Foundry\Configuration, 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
            Factory::boot(/** @scrutinizer ignore-type */ $this->container->get(Configuration::class));
Loading history...
18
        }
19 118
    }
20
}
21