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