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

Config::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 8
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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