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