Skip to content

Commit 84dd833

Browse files
committed
Updated with array key type
1 parent fd44abf commit 84dd833

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Type/Doctrine/EntityRepositoryDynamicReturnTypeExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use PHPStan\Analyser\Scope;
77
use PHPStan\Reflection\MethodReflection;
88
use PHPStan\Type\ArrayType;
9+
use PHPStan\Type\IntegerType;
910
use PHPStan\Type\MixedType;
1011
use PHPStan\Type\ObjectType;
1112
use PHPStan\Type\Type;
@@ -45,7 +46,7 @@ public function getTypeFromMethodCall(
4546
return TypeCombinator::addNull($entityType);
4647
}
4748

48-
return new ArrayType($entityType);
49+
return new ArrayType(new IntegerType(), $entityType);
4950
}
5051

5152
}

0 commit comments

Comments
 (0)