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
DeepExitException
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: Ruleset

Source Location: /PHP_CodeSniffer-3.0.2/src/Ruleset.php


Inherited Variables

Inherited Methods


Class Details

[line 17]
Stores the rules used to check and fix files.

A ruleset object directly maps to a ruleset XML file.



[ Top ]


Class Variables

$ignorePatterns = array()

[line 51]

A list of regular expressions used to ignore specific sniffs for files and folders.

Is also used to set global exclude patterns. The key is the regular expression and the value is the type of ignore pattern (absolute or relative).

  • Var: string>
  • Access: public

Type: array


[ Top ]

$includePatterns = array()

[line 62]

A list of regular expressions used to include specific sniffs for files and folders.

The key is the sniff code and the value is an array with the key being a regular expression and the value is the type of ignore pattern (absolute or relative).

  • Var: array<string, string>>
  • Access: public

Type: array


[ Top ]

$name = ''

[line 33]

The name of the coding standard being used.

If a top-level standard includes other standards, or sniffs from other standards, only the name of the top-level standard will be stored in here.

If multiple top-level standards are being loaded into a single ruleset object, this will store a comma separated list of the top-level standard names.

  • Access: public

Type: string


[ Top ]

$paths = array()

[line 40]

A list of file paths for the ruleset files being used.
  • Access: public

Type: string[]


[ Top ]

$ruleset = array()

[line 102]

An array of rules from the ruleset.xml file.

It may be empty, indicating that the ruleset does not override any of the default sniff settings.

  • Var: mixed>
  • Access: public

Type: array


[ Top ]

$rulesetDirs = array()

[line 109]

The directories that the processed rulesets are in.
  • Access: protected

Type: string[]


[ Top ]

$sniffCodes = array()

[line 82]

A mapping of sniff codes to fully qualified class names.

The key is the sniff code and the value is the fully qualified name of the sniff class.

  • Var: string>
  • Access: public

Type: array


[ Top ]

$sniffs = array()

[line 72]

An array of sniff objects that are being used to check files.

The key is the fully qualified name of the sniff class and the value is the sniff object.

  • Var: \PHP_CodeSniffer\Sniff>
  • Access: public

Type: array


[ Top ]

$tokenListeners = array()

[line 92]

An array of token types and the sniffs that are listening for them.

The key is the token name being listened for and the value is the sniff object.

  • Var: \PHP_CodeSniffer\Sniff>
  • Access: public

Type: array


[ Top ]



Method Detail

__construct (Constructor) [line 126]

void __construct( Config $config)

Initialise the ruleset that the run will use.
  • Access: public

Parameters:

\PHP_CodeSniffer\Config $config — The config data for the run.

[ Top ]

explain [line 226]

void explain( )

Prints a report showing the sniffs contained in a standard.
  • Access: public

[ Top ]

getIgnorePatterns [line 1258]

array getIgnorePatterns( [string $listener = null])

Gets the array of ignore patterns.

Optionally takes a listener to get ignore patterns specified for that sniff only.

  • Access: public

Parameters:

string $listener — The listener to get patterns for. If NULL, all patterns are returned.

[ Top ]

getIncludePatterns [line 1284]

array getIncludePatterns( [string $listener = null])

Gets the array of include patterns.

Optionally takes a listener to get include patterns specified for that sniff only.

  • Access: public

Parameters:

string $listener — The listener to get patterns for. If NULL, all patterns are returned.

[ Top ]

populateTokenListeners [line 1137]

void populateTokenListeners( )

Populates the array of PHP_CodeSniffer_Sniff's for this file.
  • Throws: RuntimeException If sniff registration fails.
  • Access: public

[ Top ]

processRuleset [line 299]

string[] processRuleset( string $rulesetPath, [int $depth = 0])

Processes a single ruleset and returns a list of the sniffs it represents.

Rules founds within the ruleset are processed immediately, but sniff classes are not registered by this method.

  • Throws: RuntimeException If the ruleset path is invalid.
  • Access: public

Parameters:

string $rulesetPath — The path to a ruleset XML file.
int $depth — How many nested processing steps we are in. This is only used for debug output.

[ Top ]

registerSniffs [line 1077]

void registerSniffs( array $files, array $restrictions, array $exclusions)

Loads and stores sniffs objects used for sniffing files.
  • Access: public

Parameters:

array $files — Paths to the sniff files to register.
array $restrictions — The sniff class names to restrict the allowed listeners to.
array $exclusions — The sniff class names to exclude from the listeners list.

[ Top ]

setSniffProperty [line 1223]

void setSniffProperty( string $sniffClass, string $name, string $value)

Set a single property for a sniff.
  • Access: public

Parameters:

string $sniffClass — The class name of the sniff.
string $name — The name of the property to change.
string $value — The new value of the property.

[ Top ]


Documentation generated on 2019年3月11日 14:04:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.

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