Skip to content

Commit 8a7896b

Browse files
committed
Affected rows can be int<0, max>
1 parent 18ab94d commit 8a7896b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Type/Doctrine/HydrationModeReturnTypeResolver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use PHPStan\Type\Accessory\AccessoryArrayListType;
88
use PHPStan\Type\ArrayType;
99
use PHPStan\Type\BenevolentUnionType;
10+
use PHPStan\Type\IntegerRangeType;
1011
use PHPStan\Type\IntegerType;
1112
use PHPStan\Type\IterableType;
1213
use PHPStan\Type\MixedType;
@@ -34,7 +35,7 @@ public function getMethodReturnTypeForHydrationMode(
3435
if ($isVoidType->yes()) {
3536
// A void query result type indicates an UPDATE or DELETE query.
3637
// In this case all methods return the number of affected rows.
37-
return new IntegerType();
38+
return IntegerRangeType::fromInterval(0, null);
3839
}
3940

4041
if ($isVoidType->maybe()) {

0 commit comments

Comments
 (0)