\Joomla_Sniffs_Commenting_ClassCommentSniff
Parses and verifies the doc comments for classes.
Verifies that :
<ul>
<li>A doc 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>Check the order of the tags.</li>
<li>Check the indentation of each tag.</li>
<li>Check required and optional tags and the format of their content.</li>
</ul>
- Author: Greg Sherwood <gsherwood@squiz.net>
- Copyright: 2006 Squiz Pty Ltd (ABN 77 084 670 600)
- License: http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
Synopsis
class Joomla_Sniffs_Commenting_ClassCommentSniff
extends Joomla_Sniffs_Commenting_FileCommentSniff
{
- // members
- protected $tags;
- // Inherited members from Joomla_Sniffs_Commenting_FileCommentSniff
- protected PHP_CodeSniffer_Comment_Parser_ClassCommentParser $commentParser;
- protected PHP_CodeSniffer_File $currentFile;
- protected $tags;
- // methods
- public array register()
- public void process()
- protected void processVersion()
- // Inherited methods from Joomla_Sniffs_Commenting_FileCommentSniff
- public array register()
- public void process()
- protected void processTags()
- protected void getIndentation()
- protected void processCategory()
- protected void processPackage()
- protected void processSubpackage()
- protected void processAuthors()
- protected void processCopyrights()
- protected void processLicense()
- protected void processVersion()
Hierarchy
Members
protected
- $commentParser
—
PHP_CodeSniffer_Comment_Parser_ClassCommentParser
The header comment parser for the current file. - $currentFile
—
PHP_CodeSniffer_File
The current PHP_CodeSniffer_File object we are processing.
Methods
protected
- processVersion() — Process the version tag.
public
- process() — Processes this test, when one of its tokens is encountered.
- register() — Returns an array of tokens this test wants to listen for.
Inherited from Joomla_Sniffs_Commenting_FileCommentSniff
protected
- getIndentation() — Get the indentation information of each tag.
- processAuthors() — Process the author tag(s) that this header comment has.
- processCategory() — Process the category tag.
- processCopyrights() — Process the copyright tags.
- processLicense() — Process the license tag.
- processPackage() — Process the package tag.
- processSubpackage() — Process the subpackage tag.
- processTags() — Processes each required or optional tag.
- processVersion() — Process the version tag.
public
- process() — Processes this test, when one of its tokens is encountered.
- register() — Returns an array of tokens this test wants to listen for.