From 9a5208c4f806175cf7279a0f64d1389c5e79ede5 Mon Sep 17 00:00:00 2001 From: Kozhumyaka Yaroslav Date: Tue, 25 Apr 2023 17:06:40 +0300 Subject: [PATCH] [f] compatible with Iterator --- Behavioral/Iterator/BookList.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Behavioral/Iterator/BookList.php b/Behavioral/Iterator/BookList.php index 7726e99..1391b41 100644 --- a/Behavioral/Iterator/BookList.php +++ b/Behavioral/Iterator/BookList.php @@ -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; }