Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
11 | 131 | public function __construct($config) |
|
12 | { |
||
13 | 131 | if (is_array($config)) { |
|
14 | 128 | $this->path = $config['path']; |
|
15 | 128 | $this->generate = $config['generate']; |
|
16 | 128 | $this->namespace = $config['namespace'] ?? $this->convertPathToNamespace($config['path']); |
|
17 | |||
18 | 128 | return; |
|
19 | } |
||
20 | 5 | $this->path = $config; |
|
21 | 5 | $this->generate = (bool) $config; |
|
22 | 5 | $this->namespace = $config; |
|
23 | 5 | } |
|
24 | |||
45 |