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


Classes:
Generic_Sniffs_Files_LineLengthSniff
Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff
Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff
Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff
Generic_Sniffs_PHP_DisallowShortOpenTagSniff
Generic_Sniffs_PHP_ForbiddenFunctionsSniff
Generic_Sniffs_PHP_LowerCaseConstantSniff
Generic_Sniffs_PHP_UpperCaseConstantSniff
Generic_Sniffs_WhiteSpace_ScopeIndentSniff
PEAR_Sniffs_Commenting_ClassCommentSniff
PEAR_Sniffs_Commenting_FileCommentSniff
PEAR_Sniffs_Commenting_FunctionCommentSniff
PEAR_Sniffs_Commenting_InlineCommentSniff
PEAR_Sniffs_ControlStructures_ControlSignatureSniff
PEAR_Sniffs_Files_IncludingFileSniff
PEAR_Sniffs_Files_LineLengthSniff
PEAR_Sniffs_Functions_FunctionCallArgumentSpacingSniff
PEAR_Sniffs_Functions_FunctionCallSignatureSniff
PEAR_Sniffs_Functions_ValidDefaultValueSniff
PEAR_Sniffs_NamingConventions_ValidClassNameSniff
PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff
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_CodingStandard
PHP_CodeSniffer_Standards_Generic_GenericCodingStandard
PHP_CodeSniffer_Standards_IncorrectPatternException
PHP_CodeSniffer_Standards_PEAR_PEARCodingStandard
PHP_CodeSniffer_Standards_Squiz_SquizCodingStandard
PHP_CodeSniffer_Tokens
Squiz_Sniffs_Arrays_ArrayDeclarationSniff
Squiz_Sniffs_Classes_ClassDeclarationSniff
Squiz_Sniffs_Classes_ClassFileNameSniff
Squiz_Sniffs_Classes_SelfMemberReferenceSniff
Squiz_Sniffs_Classes_ValidClassNameSniff
Squiz_Sniffs_Commenting_BlockCommentSniff
Squiz_Sniffs_Commenting_ClassCommentSniff
Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff
Squiz_Sniffs_Commenting_DocCommentAlignmentSniff
Squiz_Sniffs_Commenting_EmptyCatchCommentSniff
Squiz_Sniffs_Commenting_FileCommentSniff
Squiz_Sniffs_Commenting_FunctionCommentSniff
Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff
Squiz_Sniffs_Commenting_InlineCommentSniff
Squiz_Sniffs_Commenting_LongConditionClosingCommentSniff
Squiz_Sniffs_Commenting_PostStatementCommentSniff
Squiz_Sniffs_Commenting_VariableCommentSniff
Squiz_Sniffs_ControlStructures_ControlSignatureSniff
Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff
Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff
Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff
Squiz_Sniffs_ControlStructures_InlineControlStructureSniff
Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff
Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff
Squiz_Sniffs_Files_FileExtensionSniff
Squiz_Sniffs_Files_LineLengthSniff
Squiz_Sniffs_Formatting_MultipleStatementAlignmentSniff
Squiz_Sniffs_Formatting_OperatorBracketSniff
Squiz_Sniffs_Formatting_OutputBufferingIndentSniff
Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff
Squiz_Sniffs_Functions_FunctionDeclarationSniff
Squiz_Sniffs_Functions_GlobalFunctionSniff
Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff
Squiz_Sniffs_NamingConventions_ValidInterfaceNameSniff
Squiz_Sniffs_NamingConventions_ValidVariableNameSniff
Squiz_Sniffs_Operators_ComparisonOperatorUsageSniff
Squiz_Sniffs_Operators_IncrementDecrementUsageSniff
Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff
Squiz_Sniffs_PHP_DisallowObEndFlushSniff
Squiz_Sniffs_PHP_EmbeddedPhpSniff
Squiz_Sniffs_PHP_ForbiddenFunctionsSniff
Squiz_Sniffs_PHP_GlobalKeywordSniff
Squiz_Sniffs_PHP_HeredocSniff
Squiz_Sniffs_PHP_InnerFunctionsSniff
Squiz_Sniffs_Scope_MemberVarScopeSniff
Squiz_Sniffs_Scope_MethodScopeSniff
Squiz_Sniffs_Scope_StaticThisUsageSniff
Squiz_Sniffs_Strings_ConcatenationSpacingSniff
Squiz_Sniffs_Strings_DoubleQuoteUsageSniff
Squiz_Sniffs_Strings_EchoedStringsSniff
Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff
Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff
Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff
Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff
Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff
Squiz_Sniffs_WhiteSpace_ScopeIndentSniff
Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff
Files:
AbstractDocElement.php
AbstractParser.php
AbstractPatternSniff.php
AbstractScopeSniff.php
AbstractVariableSniff.php
ArrayDeclarationSniff.php
BlockCommentSniff.php
ClassCommentParser.php
ClassCommentSniff.php
ClassCommentSniff.php
ClassDeclarationSniff.php
ClassFileNameSniff.php
ClosingDeclarationCommentSniff.php
CodeSniffer.php
CodingStandard.php
CommentElement.php
ComparisonOperatorUsageSniff.php
ConcatenationSpacingSniff.php
ControlSignatureSniff.php
ControlSignatureSniff.php
ControlStructureSpacingSniff.php
DisallowObEndFlushSniff.php
DisallowShortOpenTagSniff.php
DocCommentAlignmentSniff.php
DocElement.php
DoubleQuoteUsageSniff.php
EchoedStringsSniff.php
ElseIfDeclarationSniff.php
EmbeddedPhpSniff.php
EmptyCatchCommentSniff.php
Exception.php
File.php
FileCommentSniff.php
FileCommentSniff.php
FileExtensionSniff.php
ForbiddenFunctionsSniff.php
ForbiddenFunctionsSniff.php
ForEachLoopDeclarationSniff.php
ForLoopDeclarationSniff.php
FunctionCallArgumentSpacingSniff.php
FunctionCallSignatureSniff.php
FunctionClosingBraceSpaceSniff.php
FunctionCommentParser.php
FunctionCommentSniff.php
FunctionCommentSniff.php
FunctionCommentThrowTagSniff.php
FunctionDeclarationArgumentSpacingSniff.php
FunctionDeclarationSniff.php
FunctionSpacingSniff.php
GenericCodingStandard.php
GlobalFunctionSniff.php
GlobalKeywordSniff.php
HeredocSniff.php
IncludingFileSniff.php
IncorrectPatternException.php
IncrementDecrementUsageSniff.php
InlineCommentSniff.php
InlineCommentSniff.php
InlineControlStructureSniff.php
InlineIfDeclarationSniff.php
InnerFunctionsSniff.php
LineLengthSniff.php
LineLengthSniff.php
LineLengthSniff.php
LongConditionClosingCommentSniff.php
LowerCaseConstantSniff.php
MemberCommentParser.php
MemberVarScopeSniff.php
MemberVarSpacingSniff.php
MethodScopeSniff.php
MultipleStatementAlignmentSniff.php
MultipleStatementAlignmentSniff.php
OpeningFunctionBraceBsdAllmanSniff.php
OpeningFunctionBraceKernighanRitchieSniff.php
OperatorBracketSniff.php
OperatorSpacingSniff.php
OutputBufferingIndentSniff.php
PairElement.php
ParameterElement.php
ParserException.php
PEARCodingStandard.php
PostStatementCommentSniff.php
ScopeClosingBraceSniff.php
ScopeIndentSniff.php
ScopeIndentSniff.php
ScopeIndentSniff.php
SelfMemberReferenceSniff.php
SingleElement.php
Sniff.php
SniffException.php
SquizCodingStandard.php
StaticThisUsageSniff.php
SuperfluousWhitespaceSniff.php
SwitchDeclarationSniff.php
Tokens.php
UpperCaseConstantNameSniff.php
UpperCaseConstantSniff.php
ValidClassNameSniff.php
ValidClassNameSniff.php
ValidDefaultValueSniff.php
ValidFunctionNameSniff.php
ValidFunctionNameSniff.php
ValidInterfaceNameSniff.php
ValidLogicalOperatorsSniff.php
ValidVariableNameSniff.php
VariableCommentSniff.php

Class: PHP_CodeSniffer_Standards_AbstractVariableSniff

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

Class Overview

PHP_CodeSniffer_Standards_AbstractScopeSniff
 |
 --PHP_CodeSniffer_Standards_AbstractVariableSniff

A class to find T_VARIABLE tokens.


Author(s):

Version:

  • Release: 0.5.0

Copyright:

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

Variables

Methods


Child classes:

Squiz_Sniffs_Scope_MemberVarScopeSniff
Verifies that class members have scope modifiers.
Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff
Verifies that class members are spaced correctly.
Squiz_Sniffs_NamingConventions_ValidVariableNameSniff
Squiz_Sniffs_NamingConventions_ValidVariableNameSniff.
Squiz_Sniffs_Commenting_VariableCommentSniff
Parses and verifies the variable doc comment.

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 37]
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.



[ Top ]


Class Variables

$currentFile = null

[line 59]

The current PHP_CodeSniffer file that we are processing.
  • Access: protected



[ Top ]



Method Detail

__construct (Constructor) [line 65]

PHP_CodeSniffer_Standards_AbstractVariableSniff __construct( )

Constructs an AbstractVariableTest.
  • Access: public

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

processMemberVar [line 159]

void processMemberVar( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

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

Overridden in child classes as:

Squiz_Sniffs_Scope_MemberVarScopeSniff::processMemberVar()
Processes the function tokens within the class.
Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff::processMemberVar()
Processes the function tokens within the class.
Squiz_Sniffs_NamingConventions_ValidVariableNameSniff::processMemberVar()
Processes class member variables.
Squiz_Sniffs_Commenting_VariableCommentSniff::processMemberVar()
Called to process class member vars.

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

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

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

void processVariable( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

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

Overridden in child classes as:

Squiz_Sniffs_Scope_MemberVarScopeSniff::processVariable()
Processes normal variables.
Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff::processVariable()
Processes normal variables.
Squiz_Sniffs_NamingConventions_ValidVariableNameSniff::processVariable()
Processes this test, when one of its tokens is encountered.
Squiz_Sniffs_Commenting_VariableCommentSniff::processVariable()
Called to process a normal variable.

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

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

Overridden in child classes as:

Squiz_Sniffs_Scope_MemberVarScopeSniff::processVariableInString()
Processes variables in double quoted strings.
Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff::processVariableInString()
Processes variables in double quoted strings.
Squiz_Sniffs_NamingConventions_ValidVariableNameSniff::processVariableInString()
Processes the variable found within a double quoted string.
Squiz_Sniffs_Commenting_VariableCommentSniff::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 2019年3月11日 15:00:00 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.

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