PHP_CodeSniffer
[ class tree: PHP_CodeSniffer ] [ index: PHP_CodeSniffer ] [ all elements ]

Class: PEAR_Sniffs_Commenting_ClassCommentSniff

Source Location: /PHP_CodeSniffer-0.7.0/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php

Class Overview

PEAR_Sniffs_Commenting_FileCommentSniff
   |
   --PEAR_Sniffs_Commenting_ClassCommentSniff

Parses and verifies the doc comments for classes.


Author(s):

Version:

  • Release: 0.7.0

Copyright:

  • 2006 Squiz Pty Ltd (ABN 77 084 670 600)

Methods


Inherited Variables

Inherited Methods

Class: PEAR_Sniffs_Commenting_FileCommentSniff

PEAR_Sniffs_Commenting_FileCommentSniff::getIndentation()
Get the indentation information of each tag.
PEAR_Sniffs_Commenting_FileCommentSniff::process()
Processes this test, when one of its tokens is encountered.
PEAR_Sniffs_Commenting_FileCommentSniff::processAuthors()
Process the author tag(s) that this header comment has.
PEAR_Sniffs_Commenting_FileCommentSniff::processCategory()
Process the category tag.
PEAR_Sniffs_Commenting_FileCommentSniff::processCopyright()
Process the copyright tag.
PEAR_Sniffs_Commenting_FileCommentSniff::processLicense()
Process the license tag.
PEAR_Sniffs_Commenting_FileCommentSniff::processPackage()
Process the package tag.
PEAR_Sniffs_Commenting_FileCommentSniff::processTags()
Processes each required or optional tag.
PEAR_Sniffs_Commenting_FileCommentSniff::processVersion()
Process the version tag.
PEAR_Sniffs_Commenting_FileCommentSniff::register()
Returns an array of tokens this test wants to listen for.

Class Details

[line 44]
Parses and verifies the doc comments for classes.

Verifies that :

  • A doc comment exists.
  • There is a blank newline after the short description.
  • There is a blank newline between the long and short description.
  • There is a blank newline between the long description and tags.
  • Check the order of the tags.
  • Check the indentation of each tag.
  • Check required and optional tags and the format of their content.



[ Top ]


Method Detail

process   [line 69]

void process( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Processes this test, when one of its tokens is encountered.
  • Access: public

Overrides PEAR_Sniffs_Commenting_FileCommentSniff::process() (Processes this test, when one of its tokens is encountered.)

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
int   $stackPtr   —  The position of the current token in the stack passed in $tokens.

[ Top ]

processVersion   [line 196]

void processVersion( int $errorPos)

Process the version tag.
  • Access: protected

Overrides PEAR_Sniffs_Commenting_FileCommentSniff::processVersion() (Process the version tag.)

Parameters:

int   $errorPos   —  The line number where the error occurs.

[ Top ]

register   [line 53]

array register( )

Returns an array of tokens this test wants to listen for.
  • Access: public

Overrides PEAR_Sniffs_Commenting_FileCommentSniff::register() (Returns an array of tokens this test wants to listen for.)
[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:06:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.