Conditions | 8 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 8 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
33 | 6 | private function customizeInternal(Iterable $target, Iterable $config): Iterable |
|
34 | { |
||
35 | 6 | foreach ($config as $key => $value) { |
|
36 | 6 | if (isset($target[$key])) { |
|
37 | 6 | if (is_array($value) && is_array($target[$key])) { |
|
38 | 6 | $target[$key] = $this->customizeInternal($target[$key], $value); |
|
39 | 5 | } elseif (is_string($target[$key]) && is_string($value)) { |
|
40 | 5 | $newValue = getenv($value); |
|
41 | 5 | if ($newValue) { |
|
42 | 6 | $target[$key] = $newValue; |
|
43 | } |
||
44 | } |
||
45 | } |
||
46 | } |
||
47 | 6 | return $target; |
|
48 | } |
||
59 |