mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-30 19:50:12 +02:00
[f] compatible with Iterator
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user