DotEnv::setEnvironmentVariable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4286
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php namespace Lanin\Laravel\SetupWizard\Support;
2
3
class DotEnv extends \Dotenv
4
{
5
    /**
6
     * @var array
7
     */
8
    public static $variables = [];
9
10
    /**
11
     * Overwrite to save variables to array.
12
     *
13
     * @param string $name
14
     * @param string|null $value
15
     *
16
     * @return void
17
     */
18 4
    public static function setEnvironmentVariable($name, $value = null)
19
    {
20 4
        list($name, $value) = static::normaliseEnvironmentVariable($name, $value);
21
22 4
        static::$variables[$name] = $value;
23
    }
24
}