| Total Complexity | 6 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 15.38% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | abstract class ModuleRumpWrapperBase implements ModuleRumpWrapperInterface |
||
| 17 | { |
||
| 18 | /** @var null|array<int, ModuleInterface> */ |
||
| 19 | private ?array $modules = null; |
||
| 20 | |||
| 21 | protected SpacecraftRumpBaseValuesInterface $rumpBaseValues; |
||
| 22 | |||
| 23 | 3 | public function __construct( |
|
| 24 | protected SpacecraftRumpInterface $rump, |
||
| 25 | private ?SpacecraftBuildplanInterface $buildplan |
||
| 26 | ) { |
||
| 27 | 3 | $this->rumpBaseValues = $rump->getBaseValues(); |
|
| 28 | } |
||
| 29 | |||
| 30 | abstract public function getModuleType(): SpacecraftModuleTypeEnum; |
||
| 31 | |||
| 32 | #[Override] |
||
| 33 | public function getModule(): iterable |
||
| 34 | { |
||
| 35 | if ($this->modules === null) { |
||
| 36 | $buildplan = $this->buildplan; |
||
| 37 | $this->modules = $buildplan === null |
||
| 38 | ? [] |
||
| 39 | : $buildplan->getModulesByType($this->getModuleType())->toArray(); |
||
| 40 | } |
||
| 41 | |||
| 42 | return $this->modules; |
||
| 43 | } |
||
| 44 | |||
| 45 | #[Override] |
||
| 46 | public function getSecondValue(?ModuleInterface $module = null): int |
||
| 47 | { |
||
| 48 | throw new RuntimeException(sprintf('not implemented for moduleType: %s', $this->getModuleType()->name)); |
||
| 49 | } |
||
| 50 | |||
| 51 | #[Override] |
||
| 56 | } |
||
| 57 | } |
||
| 58 |
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