Skip to content

Commit

Permalink
qa: add documentation comment on PHPStan extension
Browse files Browse the repository at this point in the history
  • Loading branch information
romm committed Apr 2, 2024
1 parent fa8bb00 commit c8174bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qa/PHPStan/Extension/TreeMapperPHPStanExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method
try {
return $this->type($type);
} catch (ParserException) {
// Fallback to `mixed` type if the type cannot be resolved. This can
// occur with a type that is not understood/supported by PHPStan. If
// that happens, returning a mixed type is the safest option, as it
// will not make the analysis fail.
return new MixedType();
}
}
Expand Down

0 comments on commit c8174bf

Please sign in to comment.