Skip to content

Commit f266412

Browse files
committed
Apply remaining suggestions from code review
1 parent d592b6f commit f266412

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/Standards/Generic/Docs/Commenting/DocCommentStandard.xml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<documentation title="Doc Comment">
22
<standard>
33
<![CDATA[
4-
Enforces several rules related to the formatting of DocBlocks in PHP code.
4+
Enforces rules related to the formatting of DocBlocks ("Doc Comments") in PHP code.
5+
6+
DocBlocks are a special type of comment that can provide information about a structural element. In the context of DocBlocks, the following are considered structural elements: require(_once) and include(_once) statements, class, interface, trait, function, property, constant and variable declarations.
7+
8+
DocBlocks start with a `/**` marker and end on `*/`. This sniff will check the formatting of all DocBlocks, independently of whether or not they are attached to a structural element.
59
]]>
610
</standard>
711
<standard>
@@ -31,14 +35,14 @@
3135
]]>
3236
</standard>
3337
<code_comparison>
34-
<code title="Valid: The opening and closing DocBlock tags are the only content on the line.">
38+
<code title="Valid: The opening and closing DocBlock tags have to be on a line by themselves.">
3539
<![CDATA[
3640
<em>/**</em>
3741
* Short description.
3842
<em>*/</em>
3943
]]>
4044
</code>
41-
<code title="Invalid: The opening and closing DocBlock tags are not the only content on the line.">
45+
<code title="Invalid: The opening and closing DocBlock tags are not on a line by themselves.">
4246
<![CDATA[
4347
<em>/** Short description. */</em>
4448
]]>
@@ -186,10 +190,10 @@
186190
/**
187191
* Short description.
188192
*
189-
* @param int $foo
193+
<em> * @param int $foo</em>
190194
*
191-
<em> * @author Some Author
192-
* @return int</em>
195+
* @since 3.4.8
196+
* @deprecated 6.0.0
193197
*/
194198
]]>
195199
</code>
@@ -198,9 +202,9 @@
198202
/**
199203
* Short description.
200204
*
201-
<em> * @param int $foo
202-
* @since 5.4.8
203-
* @return int</em>
205+
<em> * @param int $foo
206+
* @since 3.4.8
207+
* @deprecated 6.0.0</em>
204208
*/
205209
]]>
206210
</code>
@@ -216,8 +220,8 @@
216220
/**
217221
* Short description.
218222
*
219-
* @deprecated <em>1.0.0</em>
220-
* @return <em>bool</em>
223+
* @since<em> 0.5.0</em>
224+
* @deprecated<em> 1.0.0</em>
221225
*/
222226
]]>
223227
</code>
@@ -226,8 +230,8 @@
226230
/**
227231
* Short description.
228232
*
229-
* @deprecated <em>1.0.0</em>
230-
* @return <em>bool</em>
233+
* @since<em> 0.5.0</em>
234+
* @deprecated<em> 1.0.0</em>
231235
*/
232236
]]>
233237
</code>

0 commit comments

Comments
 (0)