env()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 3
rs 10
1
<?php
2
3
/*
4
 * This file is part of the PHP-ENV package.
5
 *
6
 * (c) Jitendra Adhikari <[email protected]>
7
 *     <https://github.com/adhocore>
8
 *
9
 * Licensed under MIT license.
10
 */
11
12
if (!function_exists('env')) {
13
    /**
14
     * Get the env variable by its key/name.
15
     *
16
     * @codeCoverageIgnore
17
     *
18
     * @param string    $key
19
     * @param mixed     $default
20
     * @param int|null  $filter  PHP's filter constants. See http://php.net/filter_var
21
     * @param int|array $options Additional options to filter.
22
     *
23
     * @return mixed
24
     */
25
    function env($key, $default = null, $filter = null, $options = null)
26
    {
27
        return \Ahc\Env\Retriever::getEnv($key, $default, $filter, $options);
28
    }
29
}
30