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


Classes:
PHP_CodeSniffer
AbstractPatternSniff
AbstractScopeSniff
AbstractVariableSniff
AjaxNullComparisonSniff
ArrayBracketSpacingSniff
ArrayDeclarationSniff
AssignThisSniff
Autoload
BacktickOperatorSniff
BlockCommentSniff
BrowserSpecificStylesSniff
ByteOrderMarkSniff
Cache
CallTimePassByReferenceSniff
CamelCapsFunctionNameSniff
CamelCapsMethodNameSniff
CastSpacingSniff
Cbf
CharacterBeforePHPOpeningTagSniff
Checkstyle
ClassCommentSniff
ClassDeclarationSniff
ClassDefinitionClosingBraceSpaceSniff
ClassDefinitionNameSpacingSniff
ClassDefinitionOpeningBraceSpaceSniff
ClassFileNameSniff
ClosingDeclarationCommentSniff
ClosingPHPTagSniff
ClosingTagSniff
ClosureLinterSniff
CodeAnalyzerSniff
ColonSpacingSniff
ColourDefinitionSniff
Comment
CommentedOutCodeSniff
Common
ComparisonOperatorUsageSniff
ConcatenationSpacingSniff
Config
ConstructorNameSniff
ControlSignatureSniff
ControlStructureSpacingSniff
CreateWidgetTypeCallbackSniff
CSS
CSSLintSniff
Csv
CyclomaticComplexitySniff
DebugCodeSniff
DeprecatedFunctionsSniff
Diff
DisallowAlternativePHPTagsSniff
DisallowBooleanStatementSniff
DisallowComparisonAssignmentSniff
DisallowInlineIfSniff
DisallowLongArraySyntaxSniff
DisallowMultipleAssignmentsSniff
DisallowMultipleStatementsSniff
DisallowMultipleStyleDefinitionsSniff
DisallowNewWidgetSniff
DisallowObEndFlushSniff
DisallowObjectStringIndexSniff
DisallowSelfActionsSniff
DisallowShortArraySyntaxSniff
DisallowShortOpenTagSniff
DisallowSizeFunctionsInLoopsSniff
DisallowSpaceIndentSniff
DisallowTabIndentSniff
DiscouragedFunctionsSniff
DocCommentAlignmentSniff
DocCommentSniff
DoubleQuoteUsageSniff
DummyFile
DuplicateClassDefinitionSniff
DuplicateClassNameSniff
DuplicatePropertySniff
DuplicateStyleDefinitionSniff
EchoedStringsSniff
ElseIfDeclarationSniff
Emacs
EmbeddedPhpSniff
EmptyCatchCommentSniff
EmptyClassDefinitionSniff
EmptyStatementSniff
EmptyStyleDefinitionSniff
EndFileNewlineSniff
EndFileNoNewlineSniff
ESLintSniff
EvalObjectFactorySniff
EvalSniff
ExactMatch
File
FileCommentSniff
FileExtensionSniff
FileList
Filter
FirebugConsoleSniff
Fixer
FixmeSniff
ForbiddenFunctionsSniff
ForbiddenStylesSniff
ForEachLoopDeclarationSniff
ForLoopDeclarationSniff
ForLoopShouldBeWhileLoopSniff
ForLoopWithTestFunctionCallSniff
Full
FunctionCallArgumentSpacingSniff
FunctionCallSignatureSniff
FunctionClosingBraceSniff
FunctionClosingBraceSpaceSniff
FunctionCommentSniff
FunctionCommentThrowTagSniff
FunctionDeclarationArgumentSpacingSniff
FunctionDeclarationSniff
FunctionDuplicateArgumentSniff
FunctionOpeningBraceSpaceSniff
FunctionSpacingSniff
Generator
GetRequestDataSniff
Gitblame
GitModified
GlobalFunctionSniff
GlobalKeywordSniff
HeredocSniff
Hgblame
HTML
IncludeOwnSystemSniff
IncludeSystemSniff
IncludingFileSniff
IncrementDecrementUsageSniff
IndentationSniff
Info
InlineCommentSniff
InlineControlStructureSniff
InlineHTMLSniff
InlineIfDeclarationSniff
InnerFunctionsSniff
JavaScriptLintSniff
JoinStringsSniff
JS
JSHintSniff
JSLintSniff
Json
JumbledIncrementerSniff
Junit
LanguageConstructSpacingSniff
LineEndingsSniff
LineLengthSniff
LocalFile
LogicalOperatorSpacingSniff
LongConditionClosingCommentSniff
LowercaseClassKeywordsSniff
LowerCaseConstantSniff
LowercaseDeclarationSniff
LowercasedFilenameSniff
LowercaseFunctionKeywordsSniff
LowerCaseKeywordSniff
LowercasePHPFunctionsSniff
LowercaseStyleDefinitionSniff
Markdown
MemberVarScopeSniff
MemberVarSpacingSniff
MethodDeclarationSniff
MethodScopeSniff
MissingColonSniff
MultiLineAssignmentSniff
MultiLineConditionSniff
MultiLineFunctionDeclarationSniff
MultipleStatementAlignmentSniff
NamedColoursSniff
NamespaceDeclarationSniff
NestingLevelSniff
NonExecutableCodeSniff
NoSilencedErrorsSniff
NoSpaceAfterCastSniff
Notifysend
ObjectInstantiationSniff
ObjectMemberCommaSniff
ObjectOperatorIndentSniff
ObjectOperatorSpacingSniff
OneClassPerFileSniff
OneInterfacePerFileSniff
OneTraitPerFileSniff
OpacitySniff
OpeningBraceSameLineSniff
OpeningFunctionBraceBsdAllmanSniff
OpeningFunctionBraceKernighanRitchieSniff
OperatorBracketSniff
OperatorSpacingSniff
PHP
PostStatementCommentSniff
PropertyDeclarationSniff
PropertyLabelSpacingSniff
Reporter
ReturnFunctionValueSniff
Ruleset
Runner
RuntimeException
SAPIUsageSniff
ScopeClosingBraceSniff
ScopeIndentSniff
ScopeKeywordSpacingSniff
SelfMemberReferenceSniff
SemicolonSpacingSniff
ShorthandSizeSniff
SideEffectsSniff
Source
SpaceAfterCastSniff
SpaceAfterNotSniff
Standards
StaticThisUsageSniff
SubversionPropertiesSniff
Summary
SuperfluousWhitespaceSniff
Svnblame
SwitchDeclarationSniff
SyntaxSniff
Text
Timing
TodoSniff
Tokenizer
TokenizerException
Tokens
UnconditionalIfStatementSniff
UnnecessaryFinalModifierSniff
UnnecessaryStringConcatSniff
UnusedFunctionParameterSniff
UnusedSystemSniff
UpperCaseConstantNameSniff
UpperCaseConstantSniff
UseDeclarationSniff
UselessOverridingMethodSniff
ValidClassNameSniff
ValidDefaultValueSniff
ValidFunctionNameSniff
ValidLogicalOperatorsSniff
ValidVariableNameSniff
VariableCommentSniff
VersionControl
Xml

Class: AbstractVariableSniff

Source Location: /PHP_CodeSniffer-3.0.1/src/Sniffs/AbstractVariableSniff.php

Class Overview

AbstractScopeSniff
 |
 --AbstractVariableSniff

A class to find T_VARIABLE tokens.


Author(s):

Copyright:

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

Variables

Methods


Child classes:

PropertyDeclarationSniff
Verifies that properties are declared correctly.
MemberVarScopeSniff
Verifies that class members have scope modifiers.
MemberVarSpacingSniff
Verifies that class members are spaced correctly.
Checks the naming of member variables.
VariableCommentSniff
Parses and verifies the variable doc comment.

Inherited Variables

Inherited Methods

Class: AbstractScopeSniff

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

Class Details

[line 20]
A class to find T_VARIABLE tokens.

This class can distinguish between normal T_VARIABLE tokens, and those tokens that represent class members. If a class member is encountered, then the 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 42]

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

Type: \PHP_CodeSniffer\Files\File


[ Top ]



Method Detail

__construct (Constructor) [line 48]

AbstractVariableSniff __construct( )

Constructs an AbstractVariableTest.
  • Access: public

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

processMemberVar [line 180]

void processMemberVar( File $phpcsFile, int $stackPtr)

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

Overridden in child classes as:

PropertyDeclarationSniff::processMemberVar()
Processes the function tokens within the class.
MemberVarScopeSniff::processMemberVar()
Processes the function tokens within the class.
MemberVarSpacingSniff::processMemberVar()
Processes the function tokens within the class.
ValidVariableNameSniff::processMemberVar()
Processes class member variables.
VariableCommentSniff::processMemberVar()
Called to process class member vars.

Parameters:

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

[ Top ]

processTokenOutsideScope [line 152]

void processTokenOutsideScope( File $phpcsFile, int $stackPtr)

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

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

Parameters:

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

[ Top ]

processTokenWithinScope [line 79]

void processTokenWithinScope( File $phpcsFile, int $stackPtr, int $currScope)

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

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

Parameters:

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

[ Top ]

processVariable [line 192]

void processVariable( File $phpcsFile, int $stackPtr)

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

Overridden in child classes as:

PropertyDeclarationSniff::processVariable()
Processes normal variables.
MemberVarScopeSniff::processVariable()
Processes normal variables.
MemberVarSpacingSniff::processVariable()
Processes normal variables.
ValidVariableNameSniff::processVariable()
Processes normal variables.
VariableCommentSniff::processVariable()
Called to process a normal variable.

Parameters:

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

[ Top ]

processVariableInString [line 208]

void processVariableInString( File $phpcsFile, int $stackPtr)

Called to process variables found in double quoted strings or heredocs.

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

  • Abstract:
  • Access: protected

Overridden in child classes as:

PropertyDeclarationSniff::processVariableInString()
Processes variables in double quoted strings.
MemberVarScopeSniff::processVariableInString()
Processes variables in double quoted strings.
MemberVarSpacingSniff::processVariableInString()
Processes variables in double quoted strings.
ValidVariableNameSniff::processVariableInString()
Processes variables in double quoted strings.
VariableCommentSniff::processVariableInString()
Called to process variables found in double quoted strings.

Parameters:

\PHP_CodeSniffer\Files\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:17:41 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.

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