mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-09 23:45:05 +02:00
Merge pull request #496 from yariks0n/compatible_with_iterator
[f] compatible with Iterator
This commit is contained in:
commit
5e323dbd92
@ -46,12 +46,12 @@ class BookList implements Countable, Iterator
|
||||
return $this->currentIndex;
|
||||
}
|
||||
|
||||
public function next()
|
||||
public function next(): void
|
||||
{
|
||||
$this->currentIndex++;
|
||||
}
|
||||
|
||||
public function rewind()
|
||||
public function rewind(): void
|
||||
{
|
||||
$this->currentIndex = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user