Passed
Push — master ( 28f242...472b4c )
by Gabriel
04:44
created

Config   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 62.5%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 38
ccs 5
cts 8
cp 0.625
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 3 1
A fromConfig() 0 5 1
A __construct() 0 8 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\HasPathsTrait;
13
14
    protected $params;
15
16
    /**
17
     * Config constructor.
18
     */
19 5
    public function __construct()
20
    {
21 5
        $this->params = [
22
            'paths' => [
23
                'migrations' => [],
24
                'seeds'      => [],
25
            ],
26
            'environments' => [],
27
        ];
28 5
    }
29
30
    /**
31
     * @return static
32
     */
33
    public static function fromConfig()
34
    {
35
        $config = new static();
36
37
        return $config;
38
    }
39
40
    /**
41
     * @return array
42
     */
43 3
    public function toArray()
44
    {
45 3
        return $this->params;
46
    }
47
}
48