We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1aaf057 + 40c95ba commit ecf43ceCopy full SHA for ecf43ce
src/Analyzer/ClassMethodAnalyzer.php
@@ -459,7 +459,11 @@ private function getDocReturnDeclaration(ClassMethod $method)
459
($parsedComment = $method->getAttribute('docCommentParsed'))
460
&& isset($parsedComment['return'])
461
) {
462
- $result = implode('|', $parsedComment['return']);
+ if ($parsedComment['return'][0] instanceof NullableType) {
463
+ $result = '?' . $parsedComment['return'][0]->type;
464
+ } else {
465
+ $result = implode('|', $parsedComment['return']);
466
+ }
467
468
return $result;
469
} elseif ($this->dependencyGraph !== null) {
0 commit comments