PHP 클래스 Squiz_Sniffs_Commenting_FunctionCommentSniff, PHP_CodeSniffer

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
저자: Greg Sherwood ([email protected])
저자: Marc McIntyre ([email protected])
상속: implements PHP_CodeSniffer_Sniff
파일 보기 프로젝트 열기: squizlabs/php_codesniffer 1 사용 예제들

보호된 메소드들

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

메소드 상세

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