Class: Squiz_Sniffs_Commenting_FunctionCommentSniff
Source Location: /PHP_CodeSniffer-2.1.0/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php
PEAR_Sniffs_Commenting_FunctionCommentSniff
|
--Squiz_Sniffs_Commenting_FunctionCommentSniff
Parses and verifies the doc comments for functions.
Author(s):
Version:
Copyright:
- 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
Child classes:
Inherited Variables
Inherited Methods
Class Details
[line 49]
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
Method Detail
processParams [line 258]
Process the function parameter comments.
Overrides
PEAR_Sniffs_Commenting_FunctionCommentSniff::processParams() (Process the function parameter comments.)
Parameters:
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
int
$commentStart
—
The position in the stack where the comment started.
processReturn [line 63]
Process the return comment of this function comment.
Overrides
PEAR_Sniffs_Commenting_FunctionCommentSniff::processReturn() (Process the return comment of this function comment.)
Parameters:
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
int
$commentStart
—
The position in the stack where the comment started.
processThrows [line 189]
Process any throw tags that this function comment has.
Overrides
PEAR_Sniffs_Commenting_FunctionCommentSniff::processThrows() (Process any throw tags that this function comment has.)
Parameters:
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
int
$commentStart
—
The position in the stack where the comment started.
Documentation generated on 2019年3月11日 16:00:52 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.