Conditions | 6 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
64 | 13 | final protected function getDiConfig(string $type = null) : array |
|
65 | { |
||
66 | 13 | if (empty($this->config[$this->diConfigKey]) || !is_array($this->config[$this->diConfigKey])) { |
|
67 | 7 | return []; |
|
68 | } |
||
69 | |||
70 | 6 | $diConfig = $this->config[$this->diConfigKey]; |
|
71 | |||
72 | 6 | if (null === $type) { |
|
73 | 2 | return $diConfig; |
|
74 | } |
||
75 | |||
76 | 4 | if (empty($diConfig[$type]) || !is_array($diConfig[$type])) { |
|
77 | 4 | return []; |
|
78 | } |
||
79 | |||
80 | 4 | return $diConfig[$type]; |
|
81 | } |
||
82 | } |
||
83 |