diff --git a/lib/Doctrine/ODM/MongoDB/Aggregation/Aggregation.php b/lib/Doctrine/ODM/MongoDB/Aggregation/Aggregation.php index 603eb09b9..eb860a58c 100644 --- a/lib/Doctrine/ODM/MongoDB/Aggregation/Aggregation.php +++ b/lib/Doctrine/ODM/MongoDB/Aggregation/Aggregation.php @@ -59,7 +59,7 @@ public function getIterator(): Iterator return $this->prepareIterator($cursor); } - private function prepareIterator(CursorInterface $cursor): Iterator + private function prepareIterator(CursorInterface&Iterator $cursor): Iterator { if ($this->classMetadata) { $cursor = new HydratingIterator($cursor, $this->dm->getUnitOfWork(), $this->classMetadata);