Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
18 | public static function getEnv(string $key, $default = null) |
||
19 | { |
||
20 | $value = Environment::getEnv($key); |
||
21 | if ($value) { |
||
22 | return $value; |
||
23 | } |
||
24 | if (func_num_args() === 1) { |
||
25 | throw new LogicException("Required environment variable {$key} not set"); |
||
26 | } |
||
27 | return $default; |
||
28 | } |
||
30 |