Skip to content

Commit

Permalink
Quick fix union return types
Browse files Browse the repository at this point in the history
The recent introduction of support for intersection types broke union
return types, because at the time these are actually rendered, the
current separator (`::$type_separator`) is already reset to null.  This
quick fix merely works for union types; I'll come up with a proper fix
for both union and intersection types ASAP.
  • Loading branch information
cmb69 committed Jul 25, 2021
1 parent 300f869 commit a80bb28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phpdotnet/phd/Package/PHP/XHTML.php
Expand Up @@ -448,7 +448,7 @@ public function format_methodsynopsis($open, $name, $attrs, $props) {
}
$types[] = '<span class="type">' . $formatted_type . '</span>';
}
$type = implode($this->type_separator, $types);
$type = implode("|", $types);
if (count($types) > 1) {
$type = '<span class="type">' . $type . '</span>';
}
Expand Down

0 comments on commit a80bb28

Please sign in to comment.