Skip to content

Commit 34c2adc

Browse files
committed
Fix list type required for ConstantArrayType key
1 parent 755308e commit 34c2adc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Type/ModelFetchedReturnTypeHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ private function getArrayReturnType(ClassReflection $classReflection, Scope $sco
108108
return new ConstantArrayType([], []);
109109
}
110110

111-
$fields = array_filter(
111+
$fields = array_values(array_filter(
112112
array_map(
113113
static fn (Type $type) => current($type->getConstantStrings()),
114114
current($fieldsTypes)->getValueTypes(),
115115
),
116116
static fn (ConstantStringType|false $constantStringType): bool => $constantStringType !== false,
117-
);
117+
));
118118

119119
return new ConstantArrayType(
120120
$fields,

0 commit comments

Comments
 (0)