diff --git a/src/PreloadList.php b/src/PreloadList.php index e4511d6..eb1d4db 100644 --- a/src/PreloadList.php +++ b/src/PreloadList.php @@ -4,6 +4,7 @@ use BadMethodCallException; use IteratorAggregate; +use Traversable; final class PreloadList implements IteratorAggregate { @@ -16,7 +17,7 @@ public function setList(iterable $list): void { $this->list = $list; } - public function getIterator(): iterable { + public function getIterator(): Traversable { if (!$this->list) { throw new BadMethodCallException('Attempting to fetch the iterator without setting one first.'); }