PHP Class PEAR_Sniffs_Commenting_FileCommentSniff, PHP_CodeSniffer

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

Protected Properties

Свойство Type Description
$tags array Tags in correct order and related info.

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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.
Résultat integer

processAuthor() protected méthode

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.
Résultat void

processCategory() protected méthode

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.
Résultat void

processCopyright() protected méthode

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.
Résultat void

processLicense() protected méthode

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.
Résultat void

processPackage() protected méthode

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.
Résultat void

processSubpackage() protected méthode

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.
Résultat void

processTags() protected méthode

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.
Résultat void

processVersion() protected méthode

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.
Résultat void

register() public méthode

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

Property Details

$tags protected_oe property

Tags in correct order and related info.
protected array $tags
Résultat array