Class: Squiz_Sniffs_Commenting_FunctionCommentSniff
Source Location: /PHP_CodeSniffer-0.8.0/CodeSniffer/Standards/Squiz/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 50]
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 type hint is provided for array and custom class
- Type hint matches the actual variable/class type
- A blank line is present before the first and after the last parameter
- A return type exists
- Any throw tag must have a comment
- The tag order and indentation are correct
Class Variables
$commentParser = null
[line 86]
The function comment parser for the current method.
Type:
PHP_CodeSniffer_Comment_Parser_FunctionCommentParser
$currentFile = null
[line 93]
The current PHP_CodeSniffer_File object we are processing.
Method Detail
process [line 117]
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 542]
void processParams(
int
$commentStart, int
$commentEnd)
Process the function parameter comments.
Parameters:
int
$commentStart
—
The position in the stack where the comment started.
int
$commentEnd
—
The position in the stack where the comment ended.
processReturn [line 368]
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.
processSees [line 324]
void processSees(
int
$commentStart)
Process the see tags.
Parameters:
int
$commentStart
—
The position in the stack where the comment started.
processSince [line 261]
void processSince(
int
$commentStart, int
$commentEnd)
Process the since tag.
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 485]
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 101]
Returns an array of tokens this test wants to listen for.
Documentation generated on 2019年3月11日 14:44:46 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.