Skip to content

Commit a7a9501

Browse files
committed
Instead of AccessoryArrayListType::intersectWith($type), do TypeCombinator::intersect($type, new AccessoryArrayListType()).
1 parent 7064813 commit a7a9501

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Extensions/DibiConnectionFetchDynamicReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private function reduceResultType(MethodReflection $methodReflection, Type $resu
114114
if ('fetch' === $methodName) {
115115
return TypeCombinator::addNull($resultType);
116116
} elseif ('fetchAll' === $methodName) {
117-
return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), $resultType));
117+
return TypeCombinator::intersect(new ArrayType(new IntegerType(), $resultType), new AccessoryArrayListType());
118118
} elseif ('fetchPairs' === $methodName && $resultType instanceof ConstantArrayType && 2 === \count($resultType->getValueTypes())) {
119119
return new ArrayType($resultType->getValueTypes()[0], $resultType->getValueTypes()[1]);
120120
} elseif ('fetchSingle' === $methodName && $resultType instanceof ConstantArrayType && 1 === \count($resultType->getValueTypes())) {

0 commit comments

Comments
 (0)