DotenvHelper.php ➔ env()   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 5
nc 2
nop 2
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
function env($key, $default = null)
4
{
5
    $dotenv = \Sinergi\Config\Configuration::$env;
6
    if (is_array($dotenv) && isset($dotenv[$key])) {
7
        return $dotenv[$key];
8
    }
9
    return $default;
10
}
11