| Total Complexity | 6 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | trait IteratorTrait |
||
| 6 | { |
||
| 7 | private int $offset = 0; |
||
|
|
|||
| 8 | /** |
||
| 9 | * {@inheritdoc} |
||
| 10 | */ |
||
| 11 | 9 | public function current() |
|
| 14 | } |
||
| 15 | |||
| 16 | 1 | public function key(): int |
|
| 17 | { |
||
| 18 | 1 | return $this->offset; |
|
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | */ |
||
| 24 | 7 | public function next(): void |
|
| 25 | { |
||
| 26 | 7 | ++$this->offset; |
|
| 27 | 7 | } |
|
| 28 | |||
| 29 | 9 | public function valid(): bool |
|
| 30 | { |
||
| 31 | 9 | return isset($this->array[$this->offset]); |
|
| 32 | } |
||
| 33 | |||
| 34 | 8 | public function rewind(): void |
|
| 37 | 8 | } |
|
| 38 | } |
||
| 39 |