diff --git a/src/QueryBuilder/AbstractDMLQueryBuilder.php b/src/QueryBuilder/AbstractDMLQueryBuilder.php index e7af38e74..6a1a290c1 100644 --- a/src/QueryBuilder/AbstractDMLQueryBuilder.php +++ b/src/QueryBuilder/AbstractDMLQueryBuilder.php @@ -147,11 +147,11 @@ protected function prepareTraversable(Traversable $rows): Iterator|array $rows = $rows->getIterator(); } - if ($rows instanceof Iterator && !$rows->valid()) { + /** @var Iterator $rows */ + if (!$rows->valid()) { return []; } - /** @var Iterator $rows */ return $rows; }