File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1515 "phpstan/phpdoc-parser" : " ^0.5.5" ,
1616 "sabre/xml" : " ~2.2.3" ,
1717 "symfony/console" : " ~4.4.0||~5.4.0" ,
18- "tomzx/php-semver-checker" : " ^0.15 .0" ,
18+ "tomzx/php-semver-checker" : " ^0.16 .0" ,
1919 "wikimedia/less.php" : " ^3.2"
2020 },
2121 "require-dev" : {
Original file line number Diff line number Diff line change @@ -459,7 +459,11 @@ private function getDocReturnDeclaration(ClassMethod $method)
459459 ($ parsedComment = $ method ->getAttribute ('docCommentParsed ' ))
460460 && isset ($ parsedComment ['return ' ])
461461 ) {
462- $ result = implode ('| ' , $ parsedComment ['return ' ]);
462+ if ($ parsedComment ['return ' ][0 ] instanceof NullableType) {
463+ $ result = '? ' .$ parsedComment ['return ' ][0 ]->type ;
464+ } else {
465+ $ result = implode ('| ' , $ parsedComment ['return ' ]);
466+ }
463467
464468 return $ result ;
465469 } elseif ($ this ->dependencyGraph !== null ) {
You can’t perform that action at this time.
0 commit comments