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