Passed
Push — master ( c656c3...4347f4 )
by n
01:51
created

BootLoader::boot()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace N1215\Tsukuyomi;
5
6
class BootLoader implements BootLoaderInterface
7
{
8
    /** @var string[] */
9
    private $bootstrapperClasses;
10
11
    /**
12
     * @param string[] $bootstrapperClasses
13
     */
14 1
    public function __construct(array $bootstrapperClasses)
15
    {
16 1
        $this->bootstrapperClasses = $bootstrapperClasses;
17 1
    }
18
19 1
    public function boot(): void
20
    {
21 1
        foreach($this->bootstrapperClasses as $bootstrapperClass) {
22 1
            $bootstrapper = new $bootstrapperClass();
23 1
            $bootstrapper->bootstrap();
24
        }
25
    }
26
}