Total Complexity | 5 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | abstract class Iterators extends Combinatorics implements Countable, IteratorInterface |
||
10 | { |
||
11 | /** |
||
12 | * A copy of the dataset at a give time. |
||
13 | * |
||
14 | * @var array<int, mixed> |
||
15 | */ |
||
16 | protected $current; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | protected $key = 0; |
||
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | public function current(): mixed |
||
27 | { |
||
28 | return $this->current; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function key(): int |
||
35 | { |
||
36 | return $this->key; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | * |
||
42 | * @return void |
||
43 | */ |
||
44 | public function rewind(): void |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Convert the iterator into an array. |
||
51 | * |
||
52 | * @return array<int, mixed> |
||
53 | * The elements |
||
54 | */ |
||
55 | public function toArray(): array |
||
66 |