ParameterWiringBootstrap::boot()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 3
eloc 6
nc 3
nop 1
1
<?php
2
3
namespace App\Bootstrap;
4
5
use Core\Bootstrap\BootstrapInterface;
6
use Core\LazyWiringParameterCallback;
7
use Core\ParameterWire;
8
9
class ParameterWiringBootstrap implements BootstrapInterface
10
{
11
    public function boot(array $env)
12
    {
13
        foreach ($env['parameter'] as $v) {
14
            if ($v instanceof LazyWiringParameterCallback) {
15
                ParameterWire::appendParameterCallback($v);
16
                continue;
17
            }
18
19
            ParameterWire::appendParameter($v['key'], $v['value']);
20
        }
21
    }
22
}
23