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 15
15
"phpstan/phpdoc-parser" : " ^0.5.5" ,
16
16
"sabre/xml" : " ~2.2.3" ,
17
17
"symfony/console" : " ~4.4.0||~5.4.0" ,
18
- "tomzx/php-semver-checker" : " ^0.15 .0" ,
18
+ "tomzx/php-semver-checker" : " ^0.16 .0" ,
19
19
"wikimedia/less.php" : " ^3.2"
20
20
},
21
21
"require-dev" : {
Original file line number Diff line number Diff line change @@ -459,7 +459,11 @@ private function getDocReturnDeclaration(ClassMethod $method)
459
459
($ parsedComment = $ method ->getAttribute ('docCommentParsed ' ))
460
460
&& isset ($ parsedComment ['return ' ])
461
461
) {
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
+ }
463
467
464
468
return $ result ;
465
469
} elseif ($ this ->dependencyGraph !== null ) {
You can’t perform that action at this time.
0 commit comments