Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.3332 |
Changes | 0 |
1 | <?php |
||
32 | 5 | #[Override] |
|
33 | public function getAll(?int $type = null): array |
||
34 | { |
||
35 | 5 | if ($this->commodityArray === null) { |
|
36 | $this->commodityArray = $this->commodityRepository->getAll(); |
||
37 | } |
||
38 | |||
39 | 5 | if ($type !== null) { |
|
40 | 5 | return array_filter($this->commodityArray, fn (Commodity $commodity): bool => $commodity->getType() === $type); |
|
41 | } |
||
42 | |||
43 | return $this->commodityArray; |
||
44 | } |
||
46 |
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