Skip to content

Commit b885e4a

Browse files
committed
Proper name for query results
1 parent 288cb4e commit b885e4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/GetPostsDynamicFunctionReturnTypeExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,24 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
4242

4343
// Called with an array argument
4444
if ($argumentType instanceof ConstantArrayType) {
45-
$filter = $argumentType['fields'] ?? 'all';
45+
$fields = $argumentType['fields'] ?? 'all';
4646
}
4747
// Called with a string argument
4848
if ($argumentType instanceof ConstantStringType) {
4949
parse_str($argumentType, $variables);
50-
$filter = $variables['fields'] ?? 'all';
50+
$fields = $variables['fields'] ?? 'all';
5151
}
5252

5353
// Without constant argument return default return type
54-
if (! isset($filter)) {
54+
if (! isset($fields)) {
5555
return ParametersAcceptorSelector::selectFromArgs(
5656
$scope,
5757
$functionCall->args,
5858
$functionReflection->getVariants()
5959
)->getReturnType();
6060
}
6161

62-
switch ($filter) {
62+
switch ($fields) {
6363
case 'ids':
6464
return new ArrayType(new IntegerType(), new IntegerType());
6565
case 'id=>parent':

0 commit comments

Comments
 (0)