Conditions | 5 |
Paths | 7 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
26 | 1 | public static function pushValues(array $data, array $values, string $prefix = null) |
|
27 | { |
||
28 | 1 | foreach ($data as $key => &$value) { |
|
29 | 1 | $subkey = $prefix===null ? $key : "${prefix}_$key"; |
|
30 | |||
31 | 1 | $envkey = self::getEnvKey($subkey); |
|
32 | 1 | if (isset($values[$envkey])) { |
|
33 | 1 | $value = $values[$envkey]; |
|
34 | 1 | } elseif (is_array($value)) { |
|
35 | 1 | $value = self::pushValues($value, $values, $subkey); |
|
36 | } |
||
37 | } |
||
38 | |||
39 | 1 | return $data; |
|
40 | } |
||
52 |