Checks the declaration of the class is correct.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\Classes\ClassDeclarationSniff
Checks that object operators are indented correctly.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\WhiteSpace\ObjectOperatorIndentSniff
Checks that the closing braces of scopes are aligned correctly.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\WhiteSpace\ScopeClosingBraceSniff
If an assignment goes over two lines, ensure the equal sign is indented.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\Formatting\MultiLineAssignmentSniff
Ensure include_once is used in conditional situations and require_once is used elsewhere.
declared in PHP_CodeSniffer\Standards\PEAR\Sniffs\Files\IncludingFileSniff
Ensures function calls are formatted correctly.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\FunctionCallSignatureSniff
Ensure single and multi-line function declarations are defined correctly.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\FunctionDeclarationSniff
Ensures function params with default values are at the end of the declaration.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\ValidDefaultValueSniff
Ensure multi-line IF conditions are defined correctly.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\ControlStructures\MultiLineConditionSniff
Ensures class and interface names start with a capital letter and use _ separators.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\NamingConventions\ValidClassNameSniff
Parses and verifies the doc comments for functions.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\Commenting\FunctionCommentSniff
Checks that no Perl-style comments are used.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\Commenting\InlineCommentSniff
Parses and verifies the doc comments for files.
declared in
PHP_CodeSniffer\Standards\PEAR\Sniffs\Commenting\FileCommentSniff
Checks that the file does not end with a closing tag.
declared in PHP_CodeSniffer\Standards\Zend\Sniffs\Files\ClosingTagSniff
Runs the Zend Code Analyzer (from Zend Studio) on the file.
declared in PHP_CodeSniffer\Standards\Zend\Sniffs\Debug\CodeAnalyzerSniff
Checks that the closing brace of a function goes directly after the body.
declared in
PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\FunctionClosingBraceSniff
Ensures USE blocks are declared correctly.
declared in
PHP_CodeSniffer\Standards\PSR2\Sniffs\Namespaces\UseDeclarationSniff
Ensures namespaces are declared correctly.
declared in
PHP_CodeSniffer\Standards\PSR2\Sniffs\Namespaces\NamespaceDeclarationSniff
Checks that the file does not end with a closing tag.
declared in PHP_CodeSniffer\Standards\PSR2\Sniffs\Files\ClosingTagSniff
Ensures the file ends with a newline character.
declared in PHP_CodeSniffer\Standards\PSR2\Sniffs\Files\EndFileNewlineSniff
Checks that control structures have the correct spacing around brackets.
declared in
PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\ControlStructureSpacingSniff
Ensures all switch statements are defined correctly.
declared in
PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\SwitchDeclarationSniff
Verifies that there are no else if statements (elseif should be used instead).
declared in
PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\ElseIfDeclarationSniff
Ensures that strings are not joined using array.join().
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\Strings\JoinStringsSniff
Ensure that browser-specific styles are not used.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\CSS\BrowserSpecificStylesSniff
Ensures the create() method of widget types properly uses callbacks.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\Objects\CreateWidgetTypeCallbackSniff
Ensures this is not assigned to any other var but self.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\Objects\AssignThisSniff
Ensures that widgets are not manually created.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\Objects\DisallowNewWidgetSniff
Ensures that eval() is not used to create objects.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\PHP\EvalObjectFactorySniff
Ensures that values submitted via JS are not compared to NULL.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\PHP\AjaxNullComparisonSniff
Ensures that getRequestData() is used to access super globals.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\PHP\GetRequestDataSniff
Warns when function values are returned directly.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\PHP\ReturnFunctionValueSniff
Ensures that console is not used for function or var names.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\Debug\FirebugConsoleSniff
Warns about the use of debug code.
declared in PHP_CodeSniffer\Standards\MySource\Sniffs\Debug\DebugCodeSniff
Ensures that self and static are not used to call public methods in action classes.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\Channels\DisallowSelfActionsSniff
Ensures that a system does not include itself.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\Channels\IncludeOwnSystemSniff
Ensures that systems and asset types are used if they are included.
declared in
PHP_CodeSniffer\Standards\MySource\Sniffs\Channels\UnusedSystemSniff
Checks the nesting level for methods.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\NestingLevelSniff
Checks the cyclomatic complexity (McCabe) for functions.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\CyclomaticComplexitySniff
Checks that two strings are not concatenated together; suggests using one string instead.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Strings\UnnecessaryStringConcatSniff
Reports errors if the same class or interface name is used in multiple files.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Classes\DuplicateClassNameSniff
Checks that the opening brace of a class/interface/trait is on the same line as the class declaration.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Classes\OpeningBraceSameLineSniff
Checks for unused function parameters.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\UnusedFunctionParameterSniff
Detects unnecessary overridden methods that simply call their parent.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\UselessOverridingMethodSniff
Detects unnecessary final modifiers inside of final classes.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\UnnecessaryFinalModifierSniff
Detects for-loops that can be simplified to a while-loop.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\ForLoopShouldBeWhileLoopSniff
Detects incrementer jumbling in for loops.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\JumbledIncrementerSniff
Detects variable assignments being made within conditions.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff
Checks against empty PHP statements.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\EmptyPHPStatementSniff
Detects unconditional if- and elseif-statements.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\UnconditionalIfStatementSniff
Detects for-loops that use a function call in the test expression.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\ForLoopWithTestFunctionCallSniff
This sniff class detected empty statement.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\EmptyStatementSniff
Discourages the use of alias functions.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\ForbiddenFunctionsSniff
Checks that the opening PHP tag is the first content in a file.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\CharacterBeforePHPOpeningTagSniff
Ensures PHP believes the syntax is clean.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\SyntaxSniff
Checks that all PHP types are lowercase.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\LowerCaseTypeSniff
Checks that open PHP tags are paired with closing tags.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\ClosingPHPTagSniff
Checks that the strict_types has been declared.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\RequireStrictTypesSniff
Makes sure that shorthand PHP open tags are not used.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowShortOpenTagSniff
Ensures the $_REQUEST superglobal is not used
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowRequestSuperglobalSniff
Checks that all uses of true, false and null are lowercase.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\LowerCaseConstantSniff
Discourage the use of the PHP goto
language construct.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DiscourageGotoSniff
Verifies that no alternative PHP tags are used.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowAlternativePHPTagsSniff
Ensures the PHP_SAPI constant is used instead of php_sapi_name().
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\SAPIUsageSniff
Bans the use of the backtick execution operator.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\BacktickOperatorSniff
Checks that all PHP keywords are lowercase.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\LowerCaseKeywordSniff
Throws an error or warning when any code prefixed with an asperand is encountered.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\NoSilencedErrorsSniff
Tests that the correct Subversion properties are set.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\VersionControl\SubversionPropertiesSniff
Check for merge conflict artefacts.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\VersionControl\GitMergeConflictSniff
Checks that control structures are defined and indented correctly.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\ScopeIndentSniff
Check & fix whitespace on the inside of arbitrary parentheses.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\ArbitraryParenthesesSpacingSniff
Throws errors if tabs are used for indentation.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\DisallowTabIndentSniff
Verifies spacing between variables and increment/decrement operators.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\IncrementDecrementSpacingSniff
Ensures all language constructs contain a single space between themselves and their content.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\LanguageConstructSpacingSniff
Throws errors if spaces are used for indentation other than precision indentation.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\DisallowSpaceIndentSniff
Verifies spacing between the spread operator and the variable/function call it applies to.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\SpreadOperatorSpacingAfterSniff
Ensures each statement is on a line by itself.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\DisallowMultipleStatementsSniff
Ensures there is no space after cast tokens.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\NoSpaceAfterCastSniff
Ensures there is a single space after a NOT operator.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterNotSniff
Ensures there is a single space after cast tokens.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterCastSniff
Ensures there is a single space before cast tokens.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceBeforeCastSniff
Checks alignment of assignments.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\MultipleStatementAlignmentSniff
Bans the use of the PHP long array syntax.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays\DisallowLongArraySyntaxSniff
Bans the use of the PHP short array syntax.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays\DisallowShortArraySyntaxSniff
Checks the length of all lines in a file.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff
A simple sniff for detecting a BOM definition that may corrupt application work.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\ByteOrderMarkSniff
Checks that only one object structure is declared per file.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\OneObjectStructurePerFileSniff
Checks that end of line characters are correct.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineEndingsSniff
Checks that only one trait is declared per file.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\OneTraitPerFileSniff
Ensures the whole file is PHP only, with no whitespace or inline HTML.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\Files\InlineHTMLSniff
Ensures the file does not end with a newline character.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\EndFileNoNewlineSniff
Checks that only one interface is declared per file.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\OneInterfacePerFileSniff
Checks that all file names are lowercased.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LowercasedFilenameSniff
Checks that only one class is declared per file.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\OneClassPerFileSniff
Tests that files are not executable.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\ExecutableFileSniff
Ensures the file ends with a newline character.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\EndFileNewlineSniff
Checks that the opening brace of a function is on the same line as the function declaration.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\OpeningFunctionBraceKernighanRitchieSniff
Checks that calls to methods and functions are spaced correctly.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\FunctionCallArgumentSpacingSniff
Ensures that variables are not passed by reference when calling a function.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\CallTimePassByReferenceSniff
Checks that the opening brace of a function is on the line after the function declaration.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\OpeningFunctionBraceBsdAllmanSniff
Verifies that inline control statements are not present.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\ControlStructures\InlineControlStructureSniff
Ban the use of Yoda conditions.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\ControlStructures\DisallowYodaConditionsSniff
Checks that traits are suffixed by Trait.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\TraitNameSuffixSniff
Ensures that constant names are all uppercase.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\UpperCaseConstantNameSniff
Checks that interfaces are suffixed by Interface.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\InterfaceNameSuffixSniff
Checks that abstract classes are prefixed by Abstract.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\AbstractClassNamePrefixSniff
Ensures doc blocks follow basic formatting.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\DocCommentSniff
Warns about TODO comments.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff
Warns about FIXME comments.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\FixmeSniff
Runs csslint on the file.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\CSSLintSniff
Runs eslint on the file.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\ESLintSniff
Runs jshint.js on the file.
declared in PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\JSHintSniff
Runs gjslint on the file.
declared in
PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\ClosureLinterSniff
Makes sure there are no spaces around the concatenation operator.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Strings\ConcatenationSpacingSniff
Makes sure that any use of double quotes strings are warranted.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Strings\DoubleQuoteUsageSniff
Makes sure that any strings that are "echoed" are not enclosed in brackets.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Strings\EchoedStringsSniff
A Sniff to enforce the use of IDENTICAL type operators rather than EQUAL operators.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Operators\ComparisonOperatorUsageSniff
Ensures that the ++ operators are used when possible.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Operators\IncrementDecrementUsageSniff
Ensures logical operators 'and' and 'or' are not used.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Operators\ValidLogicalOperatorsSniff
Ensure that each style definition is on a line by itself.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\DisallowMultipleStyleDefinitionsSniff
Ensure that all style definitions are in lowercase.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\LowercaseStyleDefinitionSniff
Ensure there are no blank lines between the names of classes/IDs.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ClassDefinitionNameSpacingSniff
Ensure that opacity values start with a 0 if it is not a whole number.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\OpacitySniff
Ensure a single space before, and a newline after, the class opening brace
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ClassDefinitionOpeningBraceSpaceSniff
Ensure there is no space before a colon and one space after it.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ColonSpacingSniff
Bans the use of some styles, such as deprecated or browser-specific styles.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ForbiddenStylesSniff
Ensure colour names are not used.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\NamedColoursSniff
Ensure there is a single blank line after the closing brace of a class definition.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ClassDefinitionClosingBraceSpaceSniff
Ensure colours are defined in upper-case and use shortcuts where possible.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ColourDefinitionSniff
Check for duplicate class definitions that can be merged into one.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\DuplicateClassDefinitionSniff
Ensure that style definitions are not empty.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\EmptyStyleDefinitionSniff
Ensure that class definitions are not empty.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\EmptyClassDefinitionSniff
Ensure that all style definitions have a colon.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\MissingColonSniff
Check for duplicate style definitions in the same class.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\DuplicateStyleDefinitionSniff
Ensure sizes are defined using shorthand notation where possible.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\ShorthandSizeSniff
Ensure each style definition has a semi-colon and it is spaced correctly.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\SemicolonSpacingSniff
Ensures styles are indented 4 spaces.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS\IndentationSniff
Ensures classes are in camel caps, and the first letter is capitalised.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\ValidClassNameSniff
Ensures JS classes don't contain duplicate property names.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\DuplicatePropertySniff
Ensures all class keywords are lowercase.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\LowercaseClassKeywordsSniff
Tests that the file name and the name of the class contained within the file match.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\ClassFileNameSniff
Ensures the last member of an object is not followed by a comma.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Objects\ObjectMemberCommaSniff
Ensures objects are assigned to a variable when instantiated.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Objects\ObjectInstantiationSniff
Ensures that object indexes are written in dot notation.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Objects\DisallowObjectStringIndexSniff
Bans the use of heredocs and nowdocs.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\HeredocSniff
Ensures there is only one assignment on a line, and that it is the first thing on the line.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\DisallowMultipleAssignmentsSniff
Ensures that functions within functions are never used.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\InnerFunctionsSniff
The use of eval() is discouraged.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\EvalSniff
Stops the usage of the "global" keyword.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\GlobalKeywordSniff
Ensures that boolean operators are only used inside control structure conditions.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\DisallowBooleanStatementSniff
Warn about commented out code.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\CommentedOutCodeSniff
Ensures all calls to inbuilt PHP functions are lowercase.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\LowercasePHPFunctionsSniff
Bans the use of size-based functions in loop conditions.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\DisallowSizeFunctionsInLoopsSniff
Stops inline IF statements from being used.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\DisallowInlineIfSniff
Ensures that the value of a comparison is not assigned to a variable.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\DisallowComparisonAssignmentSniff
Checks the indentation of embedded PHP code segments.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\EmbeddedPhpSniff
Warns about code that can never been executed.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\NonExecutableCodeSniff
Ensures that a property or label colon has a single space after it and no space before it.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\PropertyLabelSpacingSniff
Checks that control structures have the correct spacing around brackets.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ControlStructureSpacingSniff
Checks the separation between functions and methods.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\FunctionSpacingSniff
Ensure cast statements don't contain whitespace.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\CastSpacingSniff
Checks that there is one empty line before the closing brace of a function.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\FunctionClosingBraceSpaceSniff
Verifies that operators have valid spacing surrounding them.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\OperatorSpacingSniff
Ensure there is no whitespace before/after an object operator.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ObjectOperatorSpacingSniff
Verifies that operators have valid spacing surrounding them.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\LogicalOperatorSpacingSniff
Checks that the closing braces of scopes are aligned correctly.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ScopeClosingBraceSniff
Checks for unneeded whitespace.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff
Ensures all language constructs contain a single space between themselves and their content.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\LanguageConstructSpacingSniff
Checks that there is no empty line after the opening brace of a function.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\FunctionOpeningBraceSpaceSniff
Ensure there is a single space after scope keywords.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ScopeKeywordSpacingSniff
Ensure there is no whitespace before a semicolon.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SemicolonSpacingSniff
Tests that all arithmetic operations are bracketed.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Formatting\OperatorBracketSniff
Ensures that arrays conform to the array coding standard.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayDeclarationSniff
Ensure that there are no spaces around square brackets.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayBracketSpacingSniff
Tests that classes and interfaces are not declared in .php files.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\Files\FileExtensionSniff
Tests for functions outside of classes.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\GlobalFunctionSniff
Checks that arguments in function declarations are spaced correctly.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\FunctionDeclarationArgumentSpacingSniff
Checks that duplicate arguments are not used in function declarations.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\FunctionDuplicateArgumentSniff
Ensures all function keywords are lowercase.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\LowercaseFunctionKeywordsSniff
Verifies that there is a space between each condition of for loops.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\ForLoopDeclarationSniff
Ensures all control structure keywords are lowercase.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\LowercaseDeclarationSniff
Verifies that control statements conform to their coding standards.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\ControlSignatureSniff
Enforces switch statement formatting.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\SwitchDeclarationSniff
Tests the spacing of shorthand IF statements.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\InlineIfDeclarationSniff
Verifies that there is a space between each condition of foreach loops.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\ForEachLoopDeclarationSniff
Ensures the use of else if over elseif.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\ElseIfDeclarationSniff
Checks to ensure that there are no comments after statements.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\PostStatementCommentSniff
Checks the //end ... comments on classes, interfaces and functions.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\ClosingDeclarationCommentSniff
Tests that the stars in a doc comment align correctly.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\DocCommentAlignmentSniff
Ensures long conditions have a comment at the end.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\LongConditionClosingCommentSniff
Checks that there is adequate spacing between comments.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\InlineCommentSniff
Parses and verifies the class doc comment.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\ClassCommentSniff
Parses and verifies the file doc comment.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FileCommentSniff
Checks for empty catch clause without a comment.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\EmptyCatchCommentSniff
Verifies that a @throws tag exists for each exception type a function throws.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FunctionCommentThrowTagSniff
Verifies that block comments are used appropriately.
declared in
PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\BlockCommentSniff
Runs jslint.js on the file.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\Debug\JSLintSniff
Runs JavaScript Lint on the file.
declared in PHP_CodeSniffer\Standards\Squiz\Sniffs\Debug\JavaScriptLintSniff
Checks the declaration of the class is correct.
declared in
PHP_CodeSniffer\Standards\PSR1\Sniffs\Classes\ClassDeclarationSniff
Ensures a file declares new symbols and causes no other side effects, or executes logic with side effects, but not both.
declared in PHP_CodeSniffer\Standards\PSR1\Sniffs\Files\SideEffectsSniff
Verifies that trait import statements are defined correctly.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Traits\UseDeclarationSniff
Verifies that opening braces are not followed by blank lines.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes\OpeningBraceSpaceSniff
Verifies that closing braces are the last content on a line.
declared in PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes\ClosingBraceSniff
Verifies that classes are instantiated with parentheses.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes\ClassInstantiationSniff
Verifies that compound namespaces are not defined too deep.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Namespaces\CompoundNamespaceDepthSniff
Verifies that all class constants have their visibility set.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Properties\ConstantVisibilitySniff
Verifies that import statements are defined correctly.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Files\ImportStatementSniff
Checks the format of the file header.
declared in PHP_CodeSniffer\Standards\PSR12\Sniffs\Files\FileHeaderSniff
Checks that the open tag is defined correctly.
declared in PHP_CodeSniffer\Standards\PSR12\Sniffs\Files\OpenTagSniff
Checks the format of the declare statements.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Files\DeclareStatementSniff
Verifies that nullable typehints are lacking superfluous whitespace, e.g. ?int
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Functions\NullableTypeDeclarationSniff
Ensure return types are defined correctly for functions and closures.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Functions\ReturnTypeDeclarationSniff
Checks that control structures have the correct spacing.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\ControlStructures\ControlStructureSpacingSniff
Checks that control structures have boolean operators in the correct place.
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\ControlStructures\BooleanOperatorPlacementSniff
Verifies that the short form of type keywords is used (e.g., int, bool).
declared in
PHP_CodeSniffer\Standards\PSR12\Sniffs\Keywords\ShortFormTypeKeywordsSniff