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

Class: Squiz_Sniffs_Commenting_VariableCommentSniff

Source Location: /PHP_CodeSniffer-0.7.0/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php

Class Overview

PHP_CodeSniffer_Standards_AbstractScopeSniff
   |
   --PHP_CodeSniffer_Standards_AbstractVariableSniff
      |
      --Squiz_Sniffs_Commenting_VariableCommentSniff

Parses and verifies the variable doc comment.


Author(s):

Version:

  • Release: 0.7.0

Copyright:

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

Variables

Methods


Inherited Variables

Inherited Methods

Class: PHP_CodeSniffer_Standards_AbstractVariableSniff

PHP_CodeSniffer_Standards_AbstractVariableSniff::__construct()
Constructs an AbstractVariableTest.
PHP_CodeSniffer_Standards_AbstractVariableSniff::processMemberVar()
Called to process class member vars.
PHP_CodeSniffer_Standards_AbstractVariableSniff::processTokenOutsideScope()
Processes the token outside the scope in the file.
PHP_CodeSniffer_Standards_AbstractVariableSniff::processTokenWithinScope()
Processes the token in the specified PHP_CodeSniffer_File.
PHP_CodeSniffer_Standards_AbstractVariableSniff::processVariable()
Called to process normal member vars.
PHP_CodeSniffer_Standards_AbstractVariableSniff::processVariableInString()
Called to process variables found in duoble quoted strings.

Class: PHP_CodeSniffer_Standards_AbstractScopeSniff

PHP_CodeSniffer_Standards_AbstractScopeSniff::__construct()
Constructs a new AbstractScopeTest.
PHP_CodeSniffer_Standards_AbstractScopeSniff::process()
Processes the tokens that this test is listening for.
PHP_CodeSniffer_Standards_AbstractScopeSniff::processTokenOutsideScope()
Processes a token that is found within the scope that this test is listening to.
PHP_CodeSniffer_Standards_AbstractScopeSniff::processTokenWithinScope()
Processes a token that is found within the scope that this test is listening to.
PHP_CodeSniffer_Standards_AbstractScopeSniff::register()
The method that is called to register the tokens this test wishes to listen to.

Class Details

[line 42]
Parses and verifies the variable doc comment.

Verifies that :

  • A variable doc comment exists.
  • Short description ends with a full stop.
  • There is a blank line after the short description.
  • There is a blank line between the description and the tags.
  • Check the order, indentation and content of each tag.



[ Top ]


Class Variables

$commentParser =  null

[line 50]

The header comment parser for the current file.
  • Access: protected

Type:   PHP_CodeSniffer_Comment_Parser_ClassCommentParser


[ Top ]



Method Detail

processMemberVar   [line 62]

void processMemberVar( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Called to process class member vars.
  • Access: public

Overrides PHP_CodeSniffer_Standards_AbstractVariableSniff::processMemberVar() (Called to process class member vars.)

Parameters:

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

[ Top ]

processSees   [line 299]

void processSees( int $commentStart)

Process the see tags.
  • Access: protected

Parameters:

int   $commentStart   —  The position in the stack where the comment started.

[ Top ]

processSince   [line 245]

void processSince( int $commentStart, int $commentEnd)

Process the since tag.
  • Access: protected

Parameters:

int   $commentStart   —  The position in the stack where the comment started.
int   $commentEnd   —  The position in the stack where the comment ended.

[ Top ]

processVar   [line 192]

void processVar( int $commentStart, int $commentEnd)

Process the var tag.
  • Access: protected

Parameters:

int   $commentStart   —  The position in the stack where the comment started.
int   $commentEnd   —  The position in the stack where the comment ended.

[ Top ]

processVariable   [line 335]

void processVariable( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Called to process a normal variable.

Not required for this sniff.

  • Access: protected

Overrides PHP_CodeSniffer_Standards_AbstractVariableSniff::processVariable() (Called to process normal member vars.)

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The PHP_CodeSniffer file where this token was found.
int   $stackPtr   —  The position where the double quoted string was found.

[ Top ]

processVariableInString   [line 353]

void processVariableInString( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Called to process variables found in duoble quoted strings.

Not required for this sniff.

  • Access: protected

Overrides PHP_CodeSniffer_Standards_AbstractVariableSniff::processVariableInString() (Called to process variables found in duoble quoted strings.)

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The PHP_CodeSniffer file where this token was found.
int   $stackPtr   —  The position where the double quoted string was found.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:06:37 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.