| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4.016 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 30 | 6 | private function getArguments(array $config, $value) |
|
| 31 | { |
||
| 32 | 6 | if (is_array($value)) { |
|
| 33 | return $value; |
||
| 34 | } |
||
| 35 | |||
| 36 | 6 | $isService = 0 === strpos($value, '@'); |
|
| 37 | 6 | if ($isService) { |
|
| 38 | 2 | return str_replace('@', '', $value); |
|
| 39 | } |
||
| 40 | /** @var int|string $index */ |
||
| 41 | 6 | $index = str_replace(['%config%', '%config.', '%'], '', $value); |
|
| 42 | 6 | if (array_key_exists($index, $config)) { |
|
| 43 | 2 | return $config[$index]; |
|
| 44 | } |
||
| 45 | |||
| 46 | 4 | return $value; |
|
| 47 | } |
||
| 49 |