Skip to content

Commit 74d0968

Browse files
committed
Fix GetTaxonomiesDynamicFunctionReturnTypeExtension
1 parent b270db0 commit 74d0968

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/GetTaxonomiesDynamicFunctionReturnTypeExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
3333
{
3434
// Called without second $output arguments
3535
if (count($functionCall->args) <= 1) {
36-
return new ArrayType(new IntegerType(), new ObjectType('WP_Taxonomy'));
36+
return new ArrayType(new IntegerType(), new StringType());
3737
}
3838

3939
$argumentType = $scope->getType($functionCall->args[1]->value);
@@ -49,11 +49,11 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
4949

5050
// Called with a string $output
5151
switch ($argumentType->getValue()) {
52-
case 'names':
53-
return new ArrayType(new IntegerType(), new StringType());
5452
case 'objects':
55-
default:
5653
return new ArrayType(new IntegerType(), new ObjectType('WP_Taxonomy'));
54+
case 'names':
55+
default:
56+
return new ArrayType(new IntegerType(), new StringType());
5757
}
5858
}
5959
}

0 commit comments

Comments
 (0)