| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | private function configure($configuration) |
||
| 19 | { |
||
| 20 | $configuration->configureOptions($this->resolver); |
||
| 21 | foreach ($configuration::getChildren() as $key => $childrenClass) { |
||
| 22 | $children = new $childrenClass(); |
||
| 23 | if (!$children instanceof ConfigInterface) { |
||
| 24 | $message = sprintf("The children must implements interface %s", ConfigInterface::class); |
||
| 25 | throw new \Exception($message); |
||
| 26 | } |
||
| 27 | if ($children instanceof ConfigTreeInterface) { |
||
| 28 | $this->children[$key] = new ConfigTreeResolver($children); |
||
| 29 | } else { |
||
| 30 | $this->children[$key] = new ConfigResolver($children); |
||
| 31 | } |
||
| 49 |