| Conditions | 4 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | private function reducer(string $dotPath): callable |
||
| 27 | { |
||
| 28 | return static function ($currentValue, ConfigInterface $config) use ($dotPath) { |
||
| 29 | $found = $config->get($dotPath, null); |
||
| 30 | |||
| 31 | if ($found === null) { |
||
| 32 | return $currentValue; |
||
| 33 | } |
||
| 34 | |||
| 35 | if (is_array($currentValue) && is_array($found)) { |
||
| 36 | return array_replace_recursive($currentValue, $found); |
||
| 37 | } |
||
| 38 | |||
| 39 | return $found; |
||
| 40 | }; |
||
| 41 | } |
||
| 42 | } |
||
| 43 |