| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function load(array $module, array $constructParams = []): ?IModule |
||
| 36 | { |
||
| 37 | $classPath = $this->getClassName($module); |
||
| 38 | if ($this->container->has($classPath)) { |
||
| 39 | $module = $this->container->get($classPath); |
||
| 40 | if (!$module instanceof IModule) { |
||
| 41 | throw new ModuleException($this->getMdLang()->mdNotInstanceOfIModule($classPath)); |
||
| 42 | } |
||
| 43 | return $module; |
||
| 44 | } |
||
| 45 | return null; |
||
| 46 | } |
||
| 55 |