PHP Class SmileElasticsuite_Sniffs_Commenting_FunctionCommentSniff, elasticsuite

Author: Aurelien FOUCRET ([email protected])
Inheritance: extends PEAR_Sniffs_Commenting_FunctionCommentSniff
显示文件 Open project: smile-sa/elasticsuite

Public Methods

Method Description
process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void Processes this test, when one of its tokens is encountered.

Protected Methods

Method Description
isInheritDoc ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : boolean Is the comment an inheritdoc?
isMatchingReturn ( array $tokens, integer $returnPos ) : boolean Is the return statement matching?
processParams ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, integer $commentStart ) : void Process the function parameter comments.
processReturn ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, integer $commentStart ) : void Process the return comment of this function comment.

Method Details

isInheritDoc() protected method

Is the comment an inheritdoc?
protected isInheritDoc ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : boolean
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$stackPtr integer The position of the current token in the stack passed in $tokens.
return boolean True if the comment is an inheritdoc

isMatchingReturn() protected method

Is the return statement matching?
protected isMatchingReturn ( array $tokens, integer $returnPos ) : boolean
$tokens array Array of tokens
$returnPos integer Stack position of the T_RETURN token to process
return boolean True if the return does not return anything

process() public method

Processes this test, when one of its tokens is encountered.
public process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$stackPtr integer The position of the current token in the stack passed in $tokens.
return void

processParams() protected method

Process the function parameter comments.
protected processParams ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, integer $commentStart ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$stackPtr integer The position of the current token in the stack passed in $tokens.
$commentStart integer The position in the stack where the comment started.
return void

processReturn() protected method

Process the return comment of this function comment.
protected processReturn ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, integer $commentStart ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$stackPtr integer The position of the current token in the stack passed in $tokens.
$commentStart integer The position in the stack where the comment started.
return void