[f] compatible with Iterator

This commit is contained in:
Kozhumyaka Yaroslav
2023-04-25 17:06:40 +03:00
parent 5f022e4f8c
commit 9a5208c4f8

View File

@@ -46,12 +46,12 @@ class BookList implements Countable, Iterator
return $this->currentIndex; return $this->currentIndex;
} }
public function next() public function next(): void
{ {
$this->currentIndex++; $this->currentIndex++;
} }
public function rewind() public function rewind(): void
{ {
$this->currentIndex = 0; $this->currentIndex = 0;
} }