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