| Total Complexity | 6 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class Collection implements ArrayAccess, Countable |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var int<-1, max> |
||
| 24 | */ |
||
| 25 | protected const LIMIT = -1; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var array<TKey, TValue> |
||
| 29 | */ |
||
| 30 | public array $elements = []; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param TKey $offset |
||
|
|
|||
| 34 | * |
||
| 35 | * @return bool |
||
| 36 | */ |
||
| 37 | public function offsetExists($offset): bool |
||
| 38 | { |
||
| 39 | return isset($this->elements[$offset]); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param TKey $offset |
||
| 44 | * |
||
| 45 | * @return TValue|null |
||
| 46 | */ |
||
| 47 | #[ReturnTypeWillChange] |
||
| 48 | public function offsetGet($offset) |
||
| 49 | { |
||
| 50 | return $this->elements[$offset] ?? null; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param TKey $offset |
||
| 55 | * @param TValue $value |
||
| 56 | * |
||
| 57 | * @return void |
||
| 58 | * |
||
| 59 | * @throws OverflowException |
||
| 60 | */ |
||
| 61 | public function offsetSet($offset, $value): void |
||
| 62 | { |
||
| 63 | if ($this->count() === static::LIMIT) { |
||
| 64 | throw new OverflowException(); |
||
| 65 | } |
||
| 66 | |||
| 67 | $this->elements[$offset] = $value; |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @param TKey $offset |
||
| 72 | * |
||
| 73 | * @return void |
||
| 74 | */ |
||
| 75 | public function offsetUnset($offset): void |
||
| 76 | { |
||
| 77 | unset($this->elements[$offset]); |
||
| 78 | } |
||
| 79 | |||
| 80 | /** |
||
| 81 | * @return int<0, max> |
||
| 82 | */ |
||
| 83 | public function count(): int |
||
| 86 | } |
||
| 87 | } |
||
| 88 |
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