Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -52,7 +52,8 @@ public function getResponseFieldsFromDocBlock(array $tags, ResponseCollection $r
$type = $this->normalizeTypeName($type);

// Support optional type in annotation
if (!$this->isSupportedTypeInDocBlocks($type)) {
// The type can also be a union or nullable type (eg ?string or string|null)
if (!$this->isSupportedTypeInDocBlocks(explode('|', trim($type, '?'))[0])) {
// Then that wasn't a type, but part of the description
$description = trim("$type $description");
$type = '';

0 comments on commit 1d131b2

Please sign in to comment.