Skip to content

Commit

Permalink
Fix GH-1919: Doc comment must start with /** followed by whitespace
Browse files Browse the repository at this point in the history
While we're at it, we also fix the indentation of the example to match
common PHP formatting rules.
  • Loading branch information
cmb69 committed Oct 27, 2022
1 parent 769fdeb commit 7c30fe3
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions reference/reflection/reflectionclass/getdoccomment.xml
Expand Up @@ -13,7 +13,7 @@
<void/>
</methodsynopsis>
<para>
Gets doc comments from a class. Doc comments start with /**.
Gets doc comments from a class. Doc comments start with <literal>/**</literal>, followed by whitespace.
If there are multiple doc comments above the class definition,
the one closest to the class will be taken.
</para>
Expand All @@ -40,12 +40,12 @@
<programlisting role="php">
<![CDATA[
<?php
/**
* A test class
*
* @param foo bar
* @return baz
*/
/**
* A test class
*
* @param foo bar
* @return baz
*/
class TestClass { }
$rc = new ReflectionClass('TestClass');
Expand All @@ -56,12 +56,12 @@ var_dump($rc->getDocComment());
&example.outputs;
<screen>
<![CDATA[
string(55) "/**
* A test class
*
* @param foo bar
* @return baz
*/"
string(61) "/**
* A test class
*
* @param foo bar
* @return baz
*/"
]]>
</screen>
</example>
Expand Down

0 comments on commit 7c30fe3

Please sign in to comment.