From b4fc179ebbc03990260f911eaf9ef2feb0001a0b Mon Sep 17 00:00:00 2001 From: Aimeos Date: Tue, 21 Dec 2021 19:21:29 +0100 Subject: [PATCH] Fixed PHP 8.1 errors (#256) * Fixed PHP 8.1 errors * Fixed return type --- src/Common/ItemBag.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/ItemBag.php b/src/Common/ItemBag.php index f80c2394..7515335b 100644 --- a/src/Common/ItemBag.php +++ b/src/Common/ItemBag.php @@ -78,7 +78,7 @@ public function add($item) * * @return \ArrayIterator An \ArrayIterator instance */ - public function getIterator() + public function getIterator(): \Traversable { return new \ArrayIterator($this->items); } @@ -88,7 +88,7 @@ public function getIterator() * * @return int The number of items */ - public function count() + public function count(): int { return count($this->items); }