| Conditions | 7 | 
| Paths | 2 | 
| Total Lines | 22 | 
| Code Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 15 | protected function pushEnvVars($vars): array | ||
| 16 |     { | ||
| 17 |         $env = $this->builder->getConfig('dotenv')->getValues(); | ||
| 18 |         if (!empty($vars)) { | ||
| 19 |             foreach ($vars as $key => &$value) { | ||
| 20 |                 if (is_array($value)) { | ||
| 21 |                     foreach (array_keys($value) as $subkey) { | ||
| 22 | $envKey = $this->getEnvKey($key . '_' . $subkey); | ||
| 23 |                         if (isset($env[$envKey])) { | ||
| 24 | $value[$subkey] = $env[$envKey]; | ||
| 25 | } | ||
| 26 | } | ||
| 27 |                 } else { | ||
| 28 | $envKey = $this->getEnvKey($key); | ||
| 29 |                     if (isset($env[$envKey])) { | ||
| 30 | $vars[$key] = $env[$envKey]; | ||
| 31 | } | ||
| 32 | } | ||
| 33 | } | ||
| 34 | } | ||
| 35 | |||
| 36 | return $vars; | ||
| 37 | } | ||
| 49 |