Skip to content

Commit

Permalink
Merge pull request #823 from kukulich/build
Browse files Browse the repository at this point in the history
Fixed `ReflectionFunctionAbstract::createReturnType()` return type hint
  • Loading branch information
Ocramius authored Oct 22, 2021
2 parents 89b3a0f + 8131bd0 commit dce6176
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Reflection/ReflectionFunctionAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public function getTentativeReturnType(): ReflectionNamedType|ReflectionUnionTyp
return $this->createReturnType();
}

private function createReturnType(): ReflectionNamedType|ReflectionUnionType|null
private function createReturnType(): ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null
{
$returnType = $this->node->getReturnType();
assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType || $returnType === null);
Expand Down

0 comments on commit dce6176

Please sign in to comment.