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
파일 보기 프로젝트 열기: cakephp/cakephp-codesniffer

보호된 메소드들

메소드 설명
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