\Joomla_Sniffs_Commenting_FunctionCommentSniff

Parses and verifies the doc comments for functions.

Verifies that :
<ul>
<li>A comment exists</li>
<li>There is a blank newline after the short description.</li>
<li>There is a blank newline between the long and short description.</li>
<li>There is a blank newline between the long description and tags.</li>
<li>Parameter names represent those in the method.</li>
<li>Parameter comments are in the correct order</li>
<li>Parameter comments are complete</li>
<li>A space is present before the first and after the last parameter</li>
<li>A return type exists</li>
<li>There must be one blank line between body and headline comments.</li>
<li>Any throw tag must have an exception class.</li>
</ul>

Synopsis

class Joomla_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_Sniff {
}

Hierarchy

Members

private

  • $_classToken — int
    The position in the stack where the class token was found.
  • $_functionToken — int
    The position in the stack where the fucntion token was found.
  • $_methodName — string
    The name of the method that we are currently processing.

protected

Methods

protected

public

  • process() — Processes this test, when one of its tokens is encountered.
  • register() — Returns an array of tokens this test wants to listen for.