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


Classes:
PHP_CodeSniffer
AbstractPatternSniff
AbstractScopeSniff
AbstractVariableSniff
AjaxNullComparisonSniff
ArrayBracketSpacingSniff
ArrayDeclarationSniff
AssignmentInConditionSniff
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
OneObjectStructurePerFileSniff
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: Common

Source Location: /PHP_CodeSniffer-3.1.0/src/Util/Common.php


Inherited Variables

Inherited Methods


Class Details

[line 15]
Basic util functions.


[ Top ]


Class Variables

$allowedTypes = array(
'array',
'boolean',
'float',
'integer',
'mixed',
'object',
'string',
'resource',
'callable',
)

[line 23]

An array of variable types for param/var we will check.
  • Access: public

Type: string[]


[ Top ]



Method Detail

cleanSniffClass [line 435]

string cleanSniffClass( string $sniffClass)

Removes project-specific information from a sniff class name.
  • Access: public

Parameters:

string $sniffClass — The fully qualified sniff class name.

[ Top ]

detectLineEndings [line 139]

string detectLineEndings( string $contents)

Detects the EOL character being used in a string.
  • Access: public

Parameters:

string $contents — The contents to check.

[ Top ]

getSniffCode [line 406]

string getSniffCode( string $sniffClass)

Given a sniff class name, returns the code for the sniff.
  • Access: public

Parameters:

string $sniffClass — The fully qualified sniff class name.

[ Top ]

isCamelCaps [line 222]

boolean isCamelCaps( string $string, [boolean $classFormat = false], [boolean $public = true], [boolean $strict = true])

Returns true if the specified string is in the camel caps format.
  • Access: public

Parameters:

string $string — The string the verify.
boolean $classFormat — If true, check to see if the string is in the class format. Class format strings must start with a capital letter and contain no underscores.
boolean $public — If true, the first character in the string must be an a-z character. If false, the character must be an underscore. This argument is only applicable if $classFormat is false.
boolean $strict — If true, the string must not have two capital letters next to each other. If false, a relaxed camel caps policy is used to allow for acronyms.

[ Top ]

isPharFile [line 43]

mixed isPharFile( string $path)

Return TRUE if the path is a PHAR file.
  • Access: public

Parameters:

string $path — The path to use.

[ Top ]

isUnderscoreName [line 294]

boolean isUnderscoreName( string $string)

Returns true if the specified string is in the underscore caps format.
  • Access: public

Parameters:

string $string — The string to verify.

[ Top ]

prepareForOutput [line 165]

string prepareForOutput( string $content, [string[] $exclude = array()])

Prepares token content for output to screen.

Replaces invisible characters so they are visible. On non-Windows OSes it will also colour the invisible characters.

  • Access: public

Parameters:

string $content — The content to prepare.
string[] $exclude — A list of characters to leave invisible. Can contain \r, \n, \t and a space.

[ Top ]

realpath [line 63]

mixed realpath( string $path)

CodeSniffer alternative for realpath.

Allows for PHAR support.

  • Access: public

Parameters:

string $path — The path to use.

[ Top ]

stripBasepath [line 111]

string stripBasepath( string $path, string $basepath)

Removes a base path from the front of a file path.
  • Access: public

Parameters:

string $path — The path of the file.
string $basepath — The base path to remove. This should not end with a directory separator.

[ Top ]

suggestType [line 335]

string suggestType( string $varType)

Returns a valid variable type for param/var tag.

If type is not one of the standard type, it must be a custom type. Returns the correct type name suggestion if type name is invalid.

  • Access: public

Parameters:

string $varType — The variable type to process.

[ Top ]


Documentation generated on 2019年3月11日 13:53:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.

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