Class: PEAR_Sniffs_Commenting_FunctionCommentSniff
Source Location: /PHP_CodeSniffer-1.0.0RC2/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php
Parses and verifies the doc comments for functions.
Author(s):
Version:
Copyright:
- 2006 Squiz Pty Ltd (ABN 77 084 670 600)
Inherited Variables
Inherited Methods
Class Details
[line 48]
Parses and verifies the doc comments for functions.
Verifies that :
- A 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.
- Parameter names represent those in the method.
- Parameter comments are in the correct order
- Parameter comments are complete
- A space is present before the first and after the last parameter
- A return type exists
- If a body comment exists, it must be one blank newline from the headline comment.
- Any throw tag must have a comment.
Class Variables
$commentParser = null
[line 77]
The function comment parser for the current method.
Type:
PHP_CodeSniffer_Comment_Parser_FunctionCommentParser
$currentFile = null
[line 84]
The current PHP_CodeSniffer_File object we are processing.
Method Detail
process [line 108]
Processes this test, when one of its tokens is encountered.
Parameters:
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
processParams [line 307]
void processParams(
int
$commentStart)
Process the function parameter comments.
Parameters:
int
$commentStart
—
The position in the stack where the comment started.
processReturn [line 272]
void processReturn(
int
$commentStart, int
$commentEnd)
Process the return comment of this function comment.
Parameters:
int
$commentStart
—
The position in the stack where the comment started.
int
$commentEnd
—
The position in the stack where the comment ended.
processThrows [line 244]
void processThrows(
int
$commentStart)
Process any throw tags that this function comment has.
Parameters:
int
$commentStart
—
The position in the stack where the comment started.
register [line 92]
Returns an array of tokens this test wants to listen for.
Documentation generated on 2019年3月11日 15:11:12 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.