mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-11 08:22:38 +02:00
Merge pull request #496 from yariks0n/compatible_with_iterator
[f] compatible with Iterator
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user