Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | class Environment implements ConfigurationInterface |
||
20 | { |
||
21 | |||
22 | use CommonDriverMethods; |
||
23 | |||
24 | public function __construct() |
||
25 | { |
||
26 | $envVars = getenv(); |
||
27 | if (!is_array($envVars)) { |
||
|
|||
28 | return; |
||
29 | } |
||
30 | |||
31 | foreach ($envVars as $key => $value) { |
||
32 | $this->set($this->createKey($key), $value); |
||
33 | } |
||
34 | } |
||
35 | |||
36 | private function createKey(string $envName): string |
||
39 | } |
||
40 | } |
||
41 |