| Conditions | 5 |
| Paths | 9 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | public function load(array $module, array $constructParams = []): ?IModule |
||
| 33 | { |
||
| 34 | $classPath = $this->getClassName($module); |
||
| 35 | try { |
||
| 36 | $di = DependencyInjection::getInstance(); |
||
| 37 | if (!$module = $di->getRep($classPath)) { |
||
| 38 | $module = $di->initClass($classPath, $constructParams); |
||
| 39 | } |
||
| 40 | if (empty($module)) { |
||
| 41 | return null; |
||
| 42 | } |
||
| 43 | if (!$module instanceof IModule) { |
||
| 44 | throw new ModuleException($this->getMdLang()->mdNotInstanceOfIModule($classPath)); |
||
| 45 | } |
||
| 46 | return $module; |
||
| 47 | } catch (ReflectionException $ex) { |
||
| 48 | return null; |
||
| 49 | } |
||
| 59 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths