PHP_CodeSniffer
[ class tree: PHP_CodeSniffer ] [ index: PHP_CodeSniffer ] [ all elements ]

Class: PEAR_Sniffs_Commenting_FileCommentSniff

Source Location: /PHP_CodeSniffer-2.7.1/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php

Class Overview


Parses and verifies the doc comments for files.


Author(s):

Version:

  • Release: 2.7.1

Copyright:

  • 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)

Variables

Methods


Child classes:

PEAR_Sniffs_Commenting_ClassCommentSniff
Parses and verifies the doc comments for classes.

Inherited Variables

Inherited Methods


Class Details

[line 29]
Parses and verifies the doc comments for files.


[ Top ]


Class Variables

$tags = array(
                       '@category'   => array(
                                         'required'       => true,
                                         'allow_multiple' => false,
                                        ),'@package'=>array('required'=>true,'allow_multiple'=>false,),'@subpackage'=>array('required'=>false,'allow_multiple'=>false,),'@author'=>array('required'=>true,'allow_multiple'=>true,),'@copyright'=>array('required'=>false,'allow_multiple'=>true,),'@license'=>array('required'=>true,'allow_multiple'=>false,),'@version'=>array('required'=>false,'allow_multiple'=>false,),'@link'=>array('required'=>true,'allow_multiple'=>true,),'@see'=>array('required'=>false,'allow_multiple'=>true,),'@since'=>array('required'=>false,'allow_multiple'=>false,),'@deprecated'=>array('required'=>false,'allow_multiple'=>false,),)

[line 37]

Tags in correct order and related info.
  • Access: protected

Type:   array


[ Top ]



Method Detail

process   [line 106]

int process( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Processes this test, when one of its tokens is encountered.
  • Access: public

Overridden in child classes as:

PEAR_Sniffs_Commenting_ClassCommentSniff::process()
Processes this test, when one of its tokens is encountered.

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
int   $stackPtr   —  The position of the current token in the stack passed in $tokens.

[ Top ]

processAuthor   [line 458]

void processAuthor( PHP_CodeSniffer_File $phpcsFile, array $tags)

Process the author tag(s) that this header comment has.
  • Access: protected

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
array   $tags   —  The tokens for these tags.

[ Top ]

processCategory   [line 319]

void processCategory( PHP_CodeSniffer_File $phpcsFile, array $tags)

Process the category tag.
  • Access: protected

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
array   $tags   —  The tokens for these tags.

[ Top ]

processCopyright   [line 488]

void processCopyright( PHP_CodeSniffer_File $phpcsFile, array $tags)

Process the copyright tags.
  • Access: protected

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
array   $tags   —  The tokens for these tags.

[ Top ]

processLicense   [line 529]

void processLicense( PHP_CodeSniffer_File $phpcsFile, array $tags)

Process the license tag.
  • Access: protected

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
array   $tags   —  The tokens for these tags.

[ Top ]

processPackage   [line 361]

void processPackage( PHP_CodeSniffer_File $phpcsFile, array $tags)

Process the package tag.
  • Access: protected

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
array   $tags   —  The tokens for these tags.

[ Top ]

processSubpackage   [line 414]

void processSubpackage( PHP_CodeSniffer_File $phpcsFile, array $tags)

Process the subpackage tag.
  • Access: protected

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
array   $tags   —  The tokens for these tags.

[ Top ]

processTags   [line 222]

void processTags( PHP_CodeSniffer_File $phpcsFile, int $stackPtr, int $commentStart)

Processes each required or optional tag.
  • Access: protected

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
int   $stackPtr   —  The position of the current token in the stack passed in $tokens.
int   $commentStart   —  Position in the stack where the comment started.

[ Top ]

processVersion   [line 558]

void processVersion( PHP_CodeSniffer_File $phpcsFile, array $tags)

Process the version tag.
  • Access: protected

Overridden in child classes as:

PEAR_Sniffs_Commenting_ClassCommentSniff::processVersion()
Process the version tag.

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
array   $tags   —  The tokens for these tags.

[ Top ]

register   [line 90]

array register( )

Returns an array of tokens this test wants to listen for.
  • Access: public

Overridden in child classes as:

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:50:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.