PHP Class PEAR_Sniffs_Commenting_FileCommentSniff, PHP_CodeSniffer

Author: Greg Sherwood ([email protected])
Author: Marc McIntyre ([email protected])
Inheritance: implements PHP_CodeSniffer_Sniff
Show file Open project: squizlabs/php_codesniffer Class Usage Examples

Protected Properties

Property Type Description
$tags array Tags in correct order and related info.

Public Methods

Method Description
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.

Protected Methods

Method Description
processAuthor ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void Process the author tag(s) that this header comment has.
processCategory ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void Process the category tag.
processCopyright ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void Process the copyright tags.
processLicense ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void Process the license tag.
processPackage ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void Process the package tag.
processSubpackage ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void Process the subpackage tag.
processTags ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr, integer $commentStart ) : void Processes each required or optional tag.
processVersion ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void Process the version tag.

Method Details

process() public method

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.
return integer

processAuthor() protected method

Process the author tag(s) that this header comment has.
protected processAuthor ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$tags array The tokens for these tags.
return void

processCategory() protected method

Process the category tag.
protected processCategory ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$tags array The tokens for these tags.
return void

processCopyright() protected method

Process the copyright tags.
protected processCopyright ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$tags array The tokens for these tags.
return void

processLicense() protected method

Process the license tag.
protected processLicense ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$tags array The tokens for these tags.
return void

processPackage() protected method

Process the package tag.
protected processPackage ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$tags array The tokens for these tags.
return void

processSubpackage() protected method

Process the subpackage tag.
protected processSubpackage ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$tags array The tokens for these tags.
return void

processTags() protected method

Processes each required or optional tag.
protected processTags ( 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 Position in the stack where the comment started.
return void

processVersion() protected method

Process the version tag.
protected processVersion ( PHP_CodeSniffer_File $phpcsFile, array $tags ) : void
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$tags array The tokens for these tags.
return void

register() public method

Returns an array of tokens this test wants to listen for.
public register ( ) : array
return array

Property Details

$tags protected property

Tags in correct order and related info.
protected array $tags
return array