Affected page
https://www.php.net/manual/en/enum.roundingmode.php (I haven't checked whether other enums have the same issue)
Issue description
The synopsis displays enum cases using the PHP syntax used to define them. The description of each case is rendered as a doc comment. But that doc comment is misplaced as it is rendered after the case.
In actual PHP code, this would associate the doc comment to the following case instead). This causes descriptions to be associated to the wrong case (and so all descriptions being wrong, as they are understood by readers)
Steps to reproduce
- Go to https://www.php.net/manual/en/enum.roundingmode.php
- Look at the enum synopsis
Suggested fix
the source code properly associate the description and the identifier in each item in
|
<enumsynopsis> |
|
<enumname>RoundingMode</enumname> |
|
|
|
<enumitem> |
|
<enumidentifier>HalfAwayFromZero</enumidentifier> |
|
<enumitemdescription> |
|
Round to the nearest integer. |
|
If the decimal part is <literal>5</literal>, |
|
round to the integer with the larger absolute value. |
|
</enumitemdescription> |
|
</enumitem> |
|
|
|
<enumitem> |
|
<enumidentifier>HalfTowardsZero</enumidentifier> |
|
<enumitemdescription> |
|
Round to the nearest integer. |
|
If the decimal part is <literal>5</literal>, |
|
round to the integer with the smaller absolute value. |
|
</enumitemdescription> |
|
</enumitem> |
so this looks like a rendering issue.
Affected page
https://www.php.net/manual/en/enum.roundingmode.php (I haven't checked whether other enums have the same issue)
Issue description
The synopsis displays enum cases using the PHP syntax used to define them. The description of each case is rendered as a doc comment. But that doc comment is misplaced as it is rendered after the case.
In actual PHP code, this would associate the doc comment to the following case instead). This causes descriptions to be associated to the wrong case (and so all descriptions being wrong, as they are understood by readers)
Steps to reproduce
Suggested fix
the source code properly associate the description and the identifier in each item in
doc-en/reference/math/roundingmode.xml
Lines 19 to 38 in 276c535