PHP 클래스 Generic_Sniffs_Files_LineLengthSniff, PHP_CodeSniffer
Checks all lines in the file, and throws warnings if they are over 80
characters in length and errors if they are over 100. Both these
figures can be changed by extending this sniff in your own standard.
파일 보기
프로젝트 열기: squizlabs/php_codesniffer
1 사용 예제들
공개 프로퍼티들
공개 메소드들
메소드 |
설명 |
|
process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : integer |
Processes this test, when one of its tokens is encountered. |
|
register ( ) : array |
Returns an array of tokens this test wants to listen for. |
|
보호된 메소드들
메소드 상세
checkLineLength()
보호된 메소드
Checks if a line is too long.
protected checkLineLength ( PHP_CodeSniffer_File $phpcsFile, array $tokens, integer $stackPtr ) : null | false |
$phpcsFile |
PHP_CodeSniffer_File |
The file being scanned. |
$tokens |
array |
The token stack. |
$stackPtr |
integer |
The first token on the next line. |
리턴 |
null | false |
|
Processes this test, when one of its tokens is encountered.
public process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : integer |
$phpcsFile |
PHP_CodeSniffer_File |
The file being scanned. |
$stackPtr |
integer |
The position of the current token in
the stack passed in $tokens. |
리턴 |
integer |
|
Returns an array of tokens this test wants to listen for.
프로퍼티 상세
$absoluteLineLimit 공개적으로 프로퍼티
Set to zero (0) to disable.
public int $absoluteLineLimit |
리턴 |
integer |
|
The limit that the length of a line should not exceed.