Total Complexity | 6 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class IteratorWithBooleanKey implements \Iterator |
||
12 | { |
||
13 | private int $position = 0; |
||
14 | private array $array; |
||
15 | |||
16 | public function __construct() |
||
17 | { |
||
18 | $this->array = [new HasLength(min: 1), new HasLength(min: 1)]; |
||
19 | } |
||
20 | |||
21 | public function rewind(): void |
||
24 | } |
||
25 | |||
26 | #[ReturnTypeWillChange] |
||
30 | } |
||
31 | |||
32 | #[ReturnTypeWillChange] |
||
33 | public function key(): bool |
||
34 | { |
||
35 | return (bool) $this->position; |
||
36 | } |
||
37 | |||
38 | public function next(): void |
||
41 | } |
||
42 | |||
43 | public function valid(): bool |
||
48 |