PHP Класс CakePHP_Sniffs_Commenting_FunctionCommentSniff

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 return type exists
  • There must be one blank line between body and headline comments.
  • Any throw tag must have an exception class.
Автор: Greg Sherwood ([email protected])
Автор: Marc McIntyre ([email protected])
Наследование: implements PHP_CodeSniffer_Sniff
Показать файл Открыть проект

Защищенные методы

Метод Описание
isInheritDoc ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : boolean Is the comment an inheritdoc?
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.
processThrows ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, integer $commentStart ) : void Process any throw tags that this function comment has.

Описание методов

isInheritDoc() защищенный Метод

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.
Результат boolean True if the comment is an inheritdoc

processParams() защищенный Метод

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.
Результат void

processReturn() защищенный Метод

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.
Результат void

processThrows() защищенный Метод

Process any throw tags that this function comment has.
protected processThrows ( 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.
Результат void