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