| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | private function checkNameDuplication(Config $config) |
||
| 43 | { |
||
| 44 | $modules = []; |
||
| 45 | foreach ($config->getModules() as $module) { |
||
| 46 | $modules[] = $module->getName(); |
||
| 47 | } |
||
| 48 | |||
| 49 | if (\count($modules) != \count(\array_unique($modules))) { |
||
| 50 | throw new InvalidConfig('Two or more of your configured modules have the same name'); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |