Passed
Push — master ( ba4ca1...142814 )
by Evgeniy
58s queued 11s
created

Implementation::__construct()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 4
c 1
b 0
f 0
nc 3
nop 1
dl 0
loc 8
ccs 5
cts 5
cp 1
crap 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cekta\DI\Provider;
6
7
use Cekta\DI\Loader\Alias;
8
9
class Implementation extends KeyValue
10
{
11 6
    public function __construct(array $values)
12
    {
13 6
        foreach ($values as $key => $value) {
14 3
            if (is_string($value)) {
15 3
                $values[$key] = new Alias($value);
16
            }
17
        }
18 6
        parent::__construct($values);
19 6
    }
20
}
21