diff --git a/src/Collection.php b/src/Collection.php index 26f119382..ccb210079 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -519,7 +519,7 @@ public function get($key, $default = null): CollectionInterface */ public function getIterator(): Traversable { - yield from $this->innerIterator->getIterator(); + return $this->innerIterator->getIterator(); } public function group(): CollectionInterface diff --git a/src/Operation/All.php b/src/Operation/All.php index b2d26ffd1..e2c5ee609 100644 --- a/src/Operation/All.php +++ b/src/Operation/All.php @@ -29,7 +29,7 @@ public function __invoke(): Closure { return /** - * @return Closure(iterable): Generator|Generator + * @return Closure(iterable): ($normalize is true ? Generator : Generator) */ static fn (bool $normalize): Closure => /**