1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace NamespaceProtector\Result; |
||
6 | |||
7 | use Iterator; |
||
8 | use ArrayIterator; |
||
9 | |||
10 | /** |
||
11 | * @template T |
||
12 | * @implements ResultCollectedInterface<T> |
||
13 | */ |
||
14 | final class ResultCollected implements ResultCollectedInterface |
||
15 | { |
||
16 | /** |
||
17 | * @param array<int, T> $list |
||
18 | */ |
||
19 | public function __construct(private array $list = []) |
||
20 | { |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @param T $list |
||
0 ignored issues
–
show
|
|||
25 | * @return void |
||
26 | */ |
||
27 | public function addResult($list): void |
||
28 | { |
||
29 | $this->list[] = $list; |
||
30 | } |
||
31 | |||
32 | public function count(): int |
||
33 | { |
||
34 | return \count($this->list); |
||
35 | } |
||
36 | |||
37 | public function emptyResult(): void |
||
38 | { |
||
39 | $this->list = []; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return Iterator<T> |
||
44 | */ |
||
45 | public function getIterator(): Iterator |
||
46 | { |
||
47 | return new ArrayIterator($this->list); |
||
48 | } |
||
49 | } |
||
50 |
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