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


Classes:
PEAR_Sniffs_Commenting_InlineCommentSniff
PEAR_Sniffs_Constants_ValidConstantNameSniff
PEAR_Sniffs_ControlStructures_ControlSignatureSniff
PEAR_Sniffs_Files_IncludingFileSniff
PEAR_Sniffs_Files_LineLengthSniff
PEAR_Sniffs_Methods_FunctionCallSignatureSniff
PEAR_Sniffs_Methods_MethodCallArgumentSpacingSniff
PEAR_Sniffs_Methods_OpeningMethodBraceSniff
PEAR_Sniffs_Methods_ValidDefaultValueSniff
PEAR_Sniffs_Misc_ShortOpenTagSniff
PEAR_Sniffs_NamingConventions_ValidClassNameSniff
PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff
PEAR_Sniffs_PHP_LowerCaseConstantSniff
PEAR_Sniffs_Statements_MultipleStatementSniff
PEAR_Sniffs_Whitespace_ScopeClosingBraceSniff
PEAR_Sniffs_Whitespace_ScopeIndentSniff
PHP_CodeSniffer
PHP_CodeSniffer_CommentParser_AbstractDocElement
PHP_CodeSniffer_CommentParser_AbstractParser
PHP_CodeSniffer_CommentParser_ClassCommentParser
PHP_CodeSniffer_CommentParser_CommentElement
PHP_CodeSniffer_CommentParser_FunctionCommentParser
PHP_CodeSniffer_CommentParser_MemberCommentParser
PHP_CodeSniffer_CommentParser_PairElement
PHP_CodeSniffer_CommentParser_ParameterElement
PHP_CodeSniffer_CommentParser_ParserException
PHP_CodeSniffer_CommentParser_SingleElement
PHP_CodeSniffer_Exception
PHP_CodeSniffer_File
PHP_CodeSniffer_Sniff_Exception
PHP_CodeSniffer_Standards_AbstractPatternSniff
PHP_CodeSniffer_Standards_AbstractScopeSniff
PHP_CodeSniffer_Standards_AbstractVariableSniff
PHP_CodeSniffer_Standards_IncorrectPatternException
PHP_CodeSniffer_Tokens
Files:
AbstractDocElement.php
AbstractParser.php
AbstractPatternSniff.php
AbstractScopeSniff.php
AbstractVariableSniff.php
ClassCommentParser.php
CodeSniffer.php
CommentElement.php
ControlSignatureSniff.php
DocElement.php
Exception.php
File.php
FunctionCallSignatureSniff.php
FunctionCommentParser.php
IncludingFileSniff.php
IncorrectPatternException.php
InlineCommentSniff.php
LineLengthSniff.php
LowerCaseConstantSniff.php
MemberCommentParser.php
MethodCallArgumentSpacingSniff.php
MultipleStatementSniff.php
OpeningMethodBraceSniff.php
PairElement.php
ParameterElement.php
ParserException.php
ScopeClosingBraceSniff.php
ScopeIndentSniff.php
ShortOpenTagSniff.php
SingleElement.php
Sniff.php
SniffException.php
Tokens.php
ValidClassNameSniff.php
ValidConstantNameSniff.php
ValidDefaultValueSniff.php
ValidFunctionNameSniff.php

Class: PHP_CodeSniffer_Standards_AbstractVariableSniff

Source Location: /PHP_CodeSniffer-0.1.1/CodeSniffer/Standards/AbstractVariableSniff.php

Class Overview

PHP_CodeSniffer_Standards_AbstractScopeSniff
 |
 --PHP_CodeSniffer_Standards_AbstractVariableSniff

A class to find T_VARIABLE tokens.


Author(s):

  • Squiz Pty Ltd

Methods


Inherited Variables

Class: PHP_CodeSniffer_Standards_AbstractScopeSniff

PHP_CodeSniffer_Standards_AbstractScopeSniff::$currScope

Inherited Methods

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 46]
A class to find T_VARIABLE tokens.

This class can distingush between normal T_VARIABLE tokens, and those tokens that represent class members. If a class member is encountered, then then processMemberVar method is called so the extending class can process it. If the token is found to be a normal T_VARIABLE token, then processVariable is called.

  • Author: Squiz Pty Ltd
  • Abstract:


[ Top ]


Method Detail

__construct (Constructor) [line 74]

PHP_CodeSniffer_Standards_AbstractVariableSniff __construct( )

Constructs an AbstractVariableTest.
  • Access: public

Overrides PHP_CodeSniffer_Standards_AbstractScopeSniff::__construct() (Constructs a new AbstractScopeTest.)
[ Top ]

processMemberVar [line 168]

void processMemberVar( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Called to process class member vars.
  • Abstract:
  • Access: protected

Parameters:

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

[ Top ]

processTokenOutsideScope [line 147]

void processTokenOutsideScope( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Processes the token outside the scope in the file.
  • Access: protected

Overrides PHP_CodeSniffer_Standards_AbstractScopeSniff::processTokenOutsideScope() (Processes a token that is found within the scope that this test is listening to.)

Parameters:

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

[ Top ]

processTokenWithinScope [line 90]

void processTokenWithinScope( PHP_CodeSniffer_File $phpcsFile, int $stackPtr, array $currScope)

Processes the token in the specified PHP_CodeSniffer_File.
  • Access: protected

Overrides PHP_CodeSniffer_Standards_AbstractScopeSniff::processTokenWithinScope() (Processes a token that is found within the scope that this test is listening to.)

Parameters:

PHP_CodeSniffer_File $phpcsFile — The PHP_CodeSniffer file where this token was found.
int $stackPtr — The position where the token was found.
array $currScope — The current scope opener token.

[ Top ]

processVariable [line 179]

void processVariable( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Called to process normal member vars.
  • Abstract:
  • Access: protected

Parameters:

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

[ Top ]

processVariableInString [line 194]

void processVariableInString( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Called to process variables found in duoble quoted strings.

Note that there may be more than one variable in the string, which will result only in one call for the string.

  • Abstract:
  • Access: protected

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 2019年3月11日 14:44:50 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.

AltStyle によって変換されたページ (->オリジナル) /