| Conditions | 5 |
| Paths | 5 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 1 | public function resolve(array $options, array $context): array |
|
| 27 | { |
||
| 28 | 1 | foreach ($options as $optionName => $optionValue) { |
|
| 29 | 1 | if (is_array($optionValue)) { |
|
| 30 | 1 | $options[$optionName] = $this->resolve($optionValue, $context); |
|
| 31 | 1 | } elseif (false !== strpos($optionValue, '@')) { |
|
| 32 | 1 | $key = substr($optionValue, 1); |
|
| 33 | |||
| 34 | 1 | if ($this->accessor->isReadable($context, $key)) { |
|
| 35 | 1 | $options[$optionName] = $this->accessor->getValue($context, $key); |
|
| 36 | } |
||
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | 1 | return $options; |
|
| 41 | } |
||
| 43 |