debug()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Vars kit
4
 * User: moyo
5
 * Date: 14/12/2017
6
 * Time: 3:57 PM
7
 */
8
9
/**
10
 * @return bool
11
 */
12
function debug() : bool
13
{
14
    return env('DEBUG', 0) ? true : false;
15
}
16
17
/**
18
 * @param string $name
19
 * @param mixed $default
20
 * @return mixed
21
 */
22
function env(string $name, $default = null)
23
{
24
    return ($got = getenv($name, true)) === false ? $default : $got;
25
}
26