Passed
Push — master ( 472b4c...8e27d6 )
by Gabriel
04:44
created

Config   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 25
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fromConfig() 0 6 1
A __construct() 0 3 1
1
<?php
2
3
namespace ByTIC\Migrations\Config;
4
5
/**
6
 * Class Config.
7
 */
8
class Config
9
{
10
    use Traits\GenerateContentTrait;
11
    use Traits\HasEnviromentsTrait;
12
    use Traits\HasParamsTrait;
13
    use Traits\HasPathsTrait;
14
15
    /**
16
     * Config constructor.
17
     */
18 8
    public function __construct()
19
    {
20 8
        $this->generateBaseParams();
21 8
    }
22
23
    /**
24
     * @param array $params
25
     * @return static
26
     */
27 1
    public static function fromConfig(array $params)
28
    {
29 1
        $config = new static();
30 1
        $config->mergeParams($params);
31
32 1
        return $config;
33
    }
34
}
35