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