Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4.016 |
Changes | 0 |
1 | <?php |
||
25 | 3 | private function getArguments(array $config, $value) |
|
26 | { |
||
27 | 3 | $isService = 0 === strpos($value, '@'); |
|
28 | 3 | if ($isService) { |
|
29 | 2 | return str_replace('@', '', $value); |
|
30 | } |
||
31 | 3 | $index = str_replace(['%config%', '%config.', '%'], '', $value); |
|
32 | 3 | if (array_key_exists($index, $config)) { |
|
33 | 2 | return empty($index) |
|
34 | ? $config |
||
35 | 2 | : $config[$index]; |
|
36 | } |
||
37 | |||
38 | 1 | return $value; |
|
39 | } |
||
41 |