Merge pull request #496 from yariks0n/compatible_with_iterator

[f] compatible with Iterator
This commit is contained in:
Borislav Sabev
2023-05-04 11:26:53 +03:00
committed by GitHub

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;
} }