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

ZenstruckFoundryBundle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 2
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