Skip to content

Commit

Permalink
Affected rows can be int<0, max>
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 28, 2024
1 parent 18ab94d commit 8a7896b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Type/Doctrine/HydrationModeReturnTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IterableType;
use PHPStan\Type\MixedType;
Expand Down Expand Up @@ -34,7 +35,7 @@ public function getMethodReturnTypeForHydrationMode(
if ($isVoidType->yes()) {
// A void query result type indicates an UPDATE or DELETE query.
// In this case all methods return the number of affected rows.
return new IntegerType();
return IntegerRangeType::fromInterval(0, null);
}

if ($isVoidType->maybe()) {
Expand Down

0 comments on commit 8a7896b

Please sign in to comment.