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

Class: PEAR_Sniffs_Commenting_FileCommentSniff

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

Class Overview


Parses and verifies the doc comments for files.


Author(s):

Version:

  • Release: 2.0.0RC1

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 41]
Parses and verifies the doc comments for files.

Verifies that :

  • A doc 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.
  • A PHP version is specified.
  • Check the order of the tags.
  • Check the indentation of each tag.
  • Check required and optional tags and the format of their content.



[ 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 49]

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

Type:   array


[ Top ]



Method Detail

process   [line 118]

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 424]

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 292]

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 454]

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 495]

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 334]

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 380]

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 204]

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 524]

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 102]

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 15:58:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.