ParameterWiringBootstrap   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 14
rs 10

1 Method

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