| Total Complexity | 9 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Coverage | 64.71% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | final class AndFilter implements IteratorAggregate, Countable, ArrayAccess |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var list<AtomicFilter|OrFilter> |
||
|
|
|||
| 21 | */ |
||
| 22 | public array $filters = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param AtomicFilter|OrFilter|AndFilter ...$filters |
||
| 26 | */ |
||
| 27 | 12 | public function __construct(...$filters) |
|
| 28 | { |
||
| 29 | 12 | foreach ($filters as $filter) { |
|
| 30 | 12 | if ($filter instanceof AndFilter) { |
|
| 31 | 6 | array_push($this->filters, ...$filter->filters); |
|
| 32 | } else { |
||
| 33 | 12 | $this->filters[] = $filter; |
|
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 10 | public function getIterator(): Generator |
|
| 42 | { |
||
| 43 | 10 | yield from $this->filters; |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function offsetExists($offset): bool |
||
| 50 | { |
||
| 51 | return isset($this->filters[$offset]); |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * {@inheritdoc} |
||
| 56 | */ |
||
| 57 | 3 | public function offsetGet($offset) |
|
| 58 | { |
||
| 59 | 3 | return $this->filters[$offset]; |
|
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * {@inheritdoc} |
||
| 64 | */ |
||
| 65 | public function offsetSet($offset, $value): void |
||
| 66 | { |
||
| 67 | throw new BadMethodCallException('Filters are immutable'); |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * {@inheritdoc} |
||
| 72 | */ |
||
| 73 | public function offsetUnset($offset): void |
||
| 74 | { |
||
| 75 | throw new BadMethodCallException('Filters are immutable'); |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * {@inheritdoc} |
||
| 80 | */ |
||
| 81 | 3 | public function count(): int |
|
| 84 | } |
||
| 85 | } |
||
| 86 |
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