Block Comment

A block comment is a multi-line comment delimited by an opener "/*" and a closer "*/" which are each on their own line with the comment text in between.

Valid: Uses a valid opener and closer.

<em>/*</em> A block comment. <em>*/</em>

Invalid: Uses /** **/.

<em>/**</em> A block comment. <em>**/</em>

Valid: Uses a valid opener and closer.

<em>/*</em> * A block comment * with multiple lines. <em>*/</em>

Invalid: Uses multiple // or #.

<em>//</em> A block comment <em>//</em> with multiple lines.

<em>#</em> A block comment <em>#</em> with multiple lines.
Single line block comments are not allowed.

Valid: Multi-line block comment.

<em>/* A block comment. */</em>

Invalid: Single line block comment.

<em>/* A block comment. */</em>
A block comment should not be empty.

Valid: A block comment with contents.

/* <em> A block comment.</em> */

Invalid: An empty block comment.

/* <em></em> */
Block comment text should start on a new line immediately after the opener.

Valid: Text starts on a new line.

/* <em> A block comment.</em> */

Invalid: Text starts on the same line.

/* <em>A block comment.</em> */
If there are no asterisks at the start of each line, the contents of the docblock should be indented by at least 4 spaces.

Valid: Indented by at least 4 spaces.

/* <em> </em>A block comment <em> </em>with multiple lines. <em> </em>And a second paragraph. */

Invalid: Indented by less than 4 spaces.

/* <em> </em>A block comment <em> </em>with <em> </em>multiple lines. */
If asterisks are used, they should be aligned.

Valid: Asterisks are aligned.

/<em>*</em> <em>*</em> A block comment <em>*</em> with <em>*</em> multiple lines. <em>*</em>/

Invalid: Asterisks are not aligned.

/* * A block comment <em>*</em> with * multiple lines. <em>*</em>/
A block comment should start with a capital letter.

Valid: Starts with a capital letter.

/* <em>A</em> block comment. */

Invalid: Does not start with a capital letter.

/* <em>a</em> block comment. */
The block comment closer should be on a new line.

Valid: Closer is on a new line.

/* A block comment. <em>*/</em>

Invalid: Closer is not on a new line.

/* A block comment.<em> */</em>
If asterisks are used, the closer's asterisk should be aligned with these. Otherwise, the closer's asterisk should be aligned with the opener's slash.

Valid: The closer's asterisk is aligned with other asterisks.

/<em>*</em> <em>*</em> A block comment <em>*</em>/

Invalid: The closer's asterisk is not aligned with other asterisks.

/* * A block comment. <em>*</em>/

Valid: The closer's asterisk is aligned with the opener's slash.

<em>/</em>* A block comment. <em>*</em>/

Invalid: The closer's asterisk is not aligned with the opener's slash.

/* A block comment. <em> *</em>/
There should be an empty line after the block comment.

Valid: An empty line after the comment.

/* A block comment. */ <em></em> echo 'Content';

Invalid: No empty line after the comment.

/* A block comment. */ <em>echo 'Content';</em>
A block comment immediately after a PHP open tag should not have a preceeding blank line.

Valid: No blank line after an open tag.

<?php <em></em>/* * A block comment * with * multiple lines. */

Invalid: A blank line after an open tag.

<?php <em></em> /* * A block comment * with * multiple lines. */