Skip to content

Instantly share code, notes, and snippets.

@tmsnvd
Last active February 28, 2024 07:27
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tmsnvd/057ef1cf4fd412e8c8e866e5ba5119bc to your computer and use it in GitHub Desktop.
Save tmsnvd/057ef1cf4fd412e8c8e866e5ba5119bc to your computer and use it in GitHub Desktop.
phpcs PHP_CodeSniffer rules list
Rule Namespace Description
Arrays.ArrayBracketSpacing /Squiz.Arrays.ArrayBracketSpacing Ensure that there are no spaces around square brackets.
Arrays.ArrayDeclaration /Squiz.Arrays.ArrayDeclaration Ensures that arrays conform to the array coding standard.
Arrays.DisallowLongArraySyntax /Generic.Arrays.DisallowLongArraySyntax Bans the use of the PHP long array syntax.
Arrays.DisallowShortArraySyntax /Generic.Arrays.DisallowShortArraySyntax Bans the use of the PHP short array syntax.
CSS.BrowserSpecificStyles /MySource.CSS.BrowserSpecificStyles Ensure that browser-specific styles are not used.
CSS.ClassDefinitionClosingBraceSpace /Squiz.CSS.ClassDefinitionClosingBraceSpace Ensure there is a single blank line after the closing brace of a class definition.
CSS.ClassDefinitionNameSpacing /Squiz.CSS.ClassDefinitionNameSpacing Ensure there are no blank lines between the names of classes/IDs.
CSS.ClassDefinitionOpeningBraceSpace /Squiz.CSS.ClassDefinitionOpeningBraceSpace Ensure a single space before, and a newline after, the class opening brace
CSS.ColonSpacing /Squiz.CSS.ColonSpacing Ensure there is no space before a colon and one space after it.
CSS.ColourDefinition /Squiz.CSS.ColourDefinition Ensure colours are defined in upper-case and use shortcuts where possible.
CSS.DisallowMultipleStyleDefinitions /Squiz.CSS.DisallowMultipleStyleDefinitions Ensure that each style definition is on a line by itself.
CSS.DuplicateClassDefinition /Squiz.CSS.DuplicateClassDefinition Check for duplicate class definitions that can be merged into one.
CSS.DuplicateStyleDefinition /Squiz.CSS.DuplicateStyleDefinition Check for duplicate style definitions in the same class.
CSS.EmptyClassDefinition /Squiz.CSS.EmptyClassDefinition Ensure that class definitions are not empty.
CSS.EmptyStyleDefinition /Squiz.CSS.EmptyStyleDefinition Ensure that style definitions are not empty.
CSS.ForbiddenStyles /Squiz.CSS.ForbiddenStyles Bans the use of some styles, such as deprecated or browser-specific styles.
CSS.Indentation /Squiz.CSS.Indentation Ensures styles are indented 4 spaces.
CSS.LowercaseStyleDefinition /Squiz.CSS.LowercaseStyleDefinition Ensure that all style definitions are in lowercase.
CSS.MissingColon /Squiz.CSS.MissingColon Ensure that all style definitions have a colon.
CSS.NamedColours /Squiz.CSS.NamedColours Ensure colour names are not used.
CSS.Opacity /Squiz.CSS.Opacity Ensure that opacity values start with a 0 if it is not a whole number.
CSS.SemicolonSpacing /Squiz.CSS.SemicolonSpacing Ensure each style definition has a semi-colon and it is spaced correctly.
CSS.ShorthandSize /Squiz.CSS.ShorthandSize Ensure sizes are defined using shorthand notation where possible.
Channels.DisallowSelfActions /MySource.Channels.DisallowSelfActions Ensures that self and static are not used to call public methods in action classes.
Channels.IncludeOwnSystem /MySource.Channels.IncludeOwnSystem Ensures that a system does not include itself.
Channels.IncludeSystem /MySource.Channels.IncludeSystem Ensures that systems, asset types and libs are included before they are used.
Channels.UnusedSystem /MySource.Channels.UnusedSystem Ensures that systems and asset types are used if they are included.
Classes.ClassDeclaration /Squiz.Classes.ClassDeclaration Checks the declaration of the class and its inheritance is correct.
Classes.ClassFileName /Squiz.Classes.ClassFileName Tests that the file name and the name of the class contained within the file match.
Classes.DuplicateClassName /Generic.Classes.DuplicateClassName Reports errors if the same class or interface name is used in multiple files.
Classes.DuplicateProperty /Squiz.Classes.DuplicateProperty Ensures JS classes don't contain duplicate property names.
Classes.LowercaseClassKeywords /Squiz.Classes.LowercaseClassKeywords Ensures all class keywords are lowercase.
Classes.OpeningBraceSameLine /Generic.Classes.OpeningBraceSameLine Checks that the opening brace of a class/interface/trait is on the same line as the class declaration.
Classes.PropertyDeclaration /PSR2.Classes.PropertyDeclaration Verifies that properties are declared correctly.
Classes.SelfMemberReference /Squiz.Classes.SelfMemberReference Tests self member references.
Classes.ValidClassName /Squiz.Classes.ValidClassName Ensures classes are in camel caps, and the first letter is capitalised.
CodeAnalysis.EmptyStatement /Generic.CodeAnalysis.EmptyStatement This sniff class detected empty statement.
CodeAnalysis.ForLoopShouldBeWhileLoop /Generic.CodeAnalysis.ForLoopShouldBeWhileLoop Detects for-loops that can be simplified to a while-loop.
CodeAnalysis.ForLoopWithTestFunctionCall /Generic.CodeAnalysis.ForLoopWithTestFunctionCall Detects for-loops that use a function call in the test expression.
CodeAnalysis.JumbledIncrementer /Generic.CodeAnalysis.JumbledIncrementer Detects incrementer jumbling in for loops.
CodeAnalysis.UnconditionalIfStatement /Generic.CodeAnalysis.UnconditionalIfStatement Detects unconditional if- and elseif-statements.
CodeAnalysis.UnnecessaryFinalModifier /Generic.CodeAnalysis.UnnecessaryFinalModifier Detects unnecessary final modifiers inside of final classes.
CodeAnalysis.UnusedFunctionParameter /Generic.CodeAnalysis.UnusedFunctionParameter Checks the for unused function parameters.
CodeAnalysis.UselessOverridingMethod /Generic.CodeAnalysis.UselessOverridingMethod Detects unnecessary overridden methods that simply call their parent.
Commenting.BlockComment /Squiz.Commenting.BlockComment Verifies that block comments are used appropriately.
Commenting.ClassComment /Squiz.Commenting.ClassComment Parses and verifies the class doc comment.
Commenting.ClosingDeclarationComment /Squiz.Commenting.ClosingDeclarationComment Checks the //end ... comments on classes, interfaces and functions.
Commenting.DocComment /Generic.Commenting.DocComment Ensures doc blocks follow basic formatting.
Commenting.DocCommentAlignment /Squiz.Commenting.DocCommentAlignment Tests that the stars in a doc comment align correctly.
Commenting.EmptyCatchComment /Squiz.Commenting.EmptyCatchComment Checks for empty catch clause without a comment.
Commenting.FileComment /Squiz.Commenting.FileComment Parses and verifies the file doc comment.
Commenting.Fixme /Generic.Commenting.Fixme Warns about FIXME comments.
Commenting.FunctionComment /Squiz.Commenting.FunctionComment Parses and verifies the doc comments for functions.
Commenting.FunctionCommentThrowTag /Squiz.Commenting.FunctionCommentThrowTag Verifies that a @throws tag exists for each exception type a function throws.
Commenting.InlineComment /Squiz.Commenting.InlineComment Checks that there is adequate spacing between comments.
Commenting.LongConditionClosingComment /Squiz.Commenting.LongConditionClosingComment Ensures long conditions have a comment at the end.
Commenting.PostStatementComment /Squiz.Commenting.PostStatementComment Checks to ensure that there are no comments after statements.
Commenting.Todo /Generic.Commenting.Todo Warns about TODO comments.
Commenting.VariableComment /Squiz.Commenting.VariableComment Parses and verifies the variable doc comment.
ControlStructures.ControlSignature /Squiz.ControlStructures.ControlSignature Verifies that control statements conform to their coding standards.
ControlStructures.ControlStructureSpacing /PSR2.ControlStructures.ControlStructureSpacing Checks that control structures have the correct spacing around brackets.
ControlStructures.ElseIfDeclaration /Squiz.ControlStructures.ElseIfDeclaration Ensures the use of else if over elseif.
ControlStructures.ForEachLoopDeclaration /Squiz.ControlStructures.ForEachLoopDeclaration Verifies that there is a space between each condition of foreach loops.
ControlStructures.ForLoopDeclaration /Squiz.ControlStructures.ForLoopDeclaration Verifies that there is a space between each condition of for loops.
ControlStructures.InlineControlStructure /Generic.ControlStructures.InlineControlStructure Verifies that inline control statements are not present.
ControlStructures.InlineIfDeclaration /Squiz.ControlStructures.InlineIfDeclaration Tests the spacing of shorthand IF statements.
ControlStructures.LowercaseDeclaration /Squiz.ControlStructures.LowercaseDeclaration Ensures all control structure keywords are lowercase.
ControlStructures.MultiLineCondition /PEAR.ControlStructures.MultiLineCondition Ensure multi-line IF conditions are defined correctly.
ControlStructures.SwitchDeclaration /Squiz.ControlStructures.SwitchDeclaration Enforces switch statement formatting.
Debug.CSSLint /Generic.Debug.CSSLint Runs csslint on the file.
Debug.ClosureLinter /Generic.Debug.ClosureLinter Runs gjslint on the file.
Debug.CodeAnalyzer /Zend.Debug.CodeAnalyzer Runs the Zend Code Analyzer (from Zend Studio) on the file.
Debug.DebugCode /MySource.Debug.DebugCode Warns about the use of debug code.
Debug.ESLint /Generic.Debug.ESLint Runs eslint on the file.
Debug.FirebugConsole /MySource.Debug.FirebugConsole Ensures that console is not used for function or var names.
Debug.JSHint /Generic.Debug.JSHint Runs jshint.js on the file.
Debug.JSLint /Squiz.Debug.JSLint Runs jslint.js on the file.
Debug.JavaScriptLint /Squiz.Debug.JavaScriptLint Runs JavaScript Lint on the file.
Files.ByteOrderMark /Generic.Files.ByteOrderMark A simple sniff for detecting BOMs that may corrupt application work.
Files.ClosingTag /Zend.Files.ClosingTag Checks that the file does not end with a closing tag.
Files.EndFileNewline /PSR2.Files.EndFileNewline Ensures the file ends with a newline character.
Files.EndFileNoNewline /Generic.Files.EndFileNoNewline Ensures the file does not end with a newline character.
Files.FileExtension /Squiz.Files.FileExtension Tests that classes and interfaces are not declared in .php files.
Files.IncludingFile /PEAR.Files.IncludingFile Ensure include_once is used in conditional situations and require_once is used elsewhere.
Files.InlineHTML /Generic.Files.InlineHTML Ensures the whole file is PHP only, with no whitespace or inline HTML.
Files.LineEndings /Generic.Files.LineEndings Checks that end of line characters are correct.
Files.LineLength /Generic.Files.LineLength Checks the length of all lines in a file.
Files.LowercasedFilename /Generic.Files.LowercasedFilename Checks that all file names are lowercased.
Files.OneClassPerFile /Generic.Files.OneClassPerFile Checks that only one class is declared per file.
Files.OneInterfacePerFile /Generic.Files.OneInterfacePerFile Checks that only one interface is declared per file.
Files.OneTraitPerFile /Generic.Files.OneTraitPerFile Checks that only one trait is declared per file.
Files.SideEffects /PSR1.Files.SideEffects Ensures a file declares new symbols and causes no other side effects, or executes logic with side effects, but not both.
Formatting.DisallowMultipleStatements /Generic.Formatting.DisallowMultipleStatements Ensures each statement is on a line by itself.
Formatting.MultiLineAssignment /PEAR.Formatting.MultiLineAssignment If an assignment goes over two lines, ensure the equal sign is indented.
Formatting.MultipleStatementAlignment /Generic.Formatting.MultipleStatementAlignment Checks alignment of assignments.
Formatting.NoSpaceAfterCast /Generic.Formatting.NoSpaceAfterCast Ensures there is no space after cast tokens.
Formatting.OperatorBracket /Squiz.Formatting.OperatorBracket Tests that all arithmetic operations are bracketed.
Formatting.SpaceAfterCast /Generic.Formatting.SpaceAfterCast Ensures there is a single space after cast tokens.
Formatting.SpaceAfterNot /Generic.Formatting.SpaceAfterNot Ensures there is a single space after a NOT operator.
Functions.CallTimePassByReference /Generic.Functions.CallTimePassByReference Ensures that variables are not passed by reference when calling a function.
Functions.FunctionCallArgumentSpacing /Generic.Functions.FunctionCallArgumentSpacing Checks that calls to methods and functions are spaced correctly.
Functions.FunctionCallSignature /PEAR.Functions.FunctionCallSignature Ensures function calls are formatted correctly.
Functions.FunctionDeclaration /Squiz.Functions.FunctionDeclaration Checks the function declaration is correct.
Functions.FunctionDeclarationArgumentSpacing /Squiz.Functions.FunctionDeclarationArgumentSpacing Checks that arguments in function declarations are spaced correctly.
Functions.FunctionDuplicateArgument /Squiz.Functions.FunctionDuplicateArgument Checks that duplicate arguments are not used in function declarations.
Functions.GlobalFunction /Squiz.Functions.GlobalFunction Tests for functions outside of classes.
Functions.LowercaseFunctionKeywords /Squiz.Functions.LowercaseFunctionKeywords Ensures all function keywords are lowercase.
Functions.MultiLineFunctionDeclaration /Squiz.Functions.MultiLineFunctionDeclaration Ensure single and multi-line function declarations are defined correctly.
Functions.OpeningFunctionBraceBsdAllman /Generic.Functions.OpeningFunctionBraceBsdAllman Checks that the opening brace of a function is on the line after the function declaration.
Functions.OpeningFunctionBraceKernighanRitchie /Generic.Functions.OpeningFunctionBraceKernighanRitchie Checks that the opening brace of a function is on the same line as the function declaration.
Functions.ValidDefaultValue /PEAR.Functions.ValidDefaultValue Ensures function params with default values are at the end of the declaration.
Methods.CamelCapsMethodName /PSR1.Methods.CamelCapsMethodName Ensures method names are defined using camel case.
Methods.FunctionCallSignature /PSR2.Methods.FunctionCallSignature Checks that the function call format is correct.
Methods.FunctionClosingBrace /PSR2.Methods.FunctionClosingBrace Checks that the closing brace of a function goes directly after the body.
Methods.MethodDeclaration /PSR2.Methods.MethodDeclaration Checks that the method declaration is correct.
Metrics.CyclomaticComplexity /Generic.Metrics.CyclomaticComplexity Checks the cyclomatic complexity (McCabe) for functions.
Metrics.NestingLevel /Generic.Metrics.NestingLevel Checks the nesting level for methods.
Namespaces.NamespaceDeclaration /PSR2.Namespaces.NamespaceDeclaration Ensures namespaces are declared correctly.
Namespaces.UseDeclaration /PSR2.Namespaces.UseDeclaration Ensures USE blocks are declared correctly.
NamingConventions.CamelCapsFunctionName /Generic.NamingConventions.CamelCapsFunctionName Ensures method and functions are named correctly.
NamingConventions.ConstructorName /Generic.NamingConventions.ConstructorName Bans PHP 4 style constructors.
NamingConventions.UpperCaseConstantName /Generic.NamingConventions.UpperCaseConstantName Ensures that constant names are all uppercase.
NamingConventions.ValidClassName /PEAR.NamingConventions.ValidClassName Ensures class and interface names start with a capital letter and use _ separators.
NamingConventions.ValidFunctionName /Squiz.NamingConventions.ValidFunctionName Ensures method names are correct.
NamingConventions.ValidVariableName /Zend.NamingConventions.ValidVariableName Checks the naming of variables and member variables.
Objects.AssignThis /MySource.Objects.AssignThis Ensures this is not assigned to any other var but self.
Objects.CreateWidgetTypeCallback /MySource.Objects.CreateWidgetTypeCallback Ensures the create() method of widget types properly uses callbacks.
Objects.DisallowNewWidget /MySource.Objects.DisallowNewWidget Ensures that widgets are not manually created.
Objects.DisallowObjectStringIndex /Squiz.Objects.DisallowObjectStringIndex Ensures that object indexes are written in dot notation.
Objects.ObjectInstantiation /Squiz.Objects.ObjectInstantiation Ensures objects are assigned to a variable when instantiated.
Objects.ObjectMemberComma /Squiz.Objects.ObjectMemberComma Ensures the last member of an object is not followed by a comma.
Operators.ComparisonOperatorUsage /Squiz.Operators.ComparisonOperatorUsage A Sniff to enforce the use of IDENTICAL type operators rather than EQUAL operators.
Operators.IncrementDecrementUsage /Squiz.Operators.IncrementDecrementUsage Ensures that the ++ operators are used when possible.
Operators.ValidLogicalOperators /Squiz.Operators.ValidLogicalOperators Ensures logical operators 'and' and 'or' are not used.
PHP.AjaxNullComparison /MySource.PHP.AjaxNullComparison Ensures that values submitted via JS are not compared to NULL.
PHP.BacktickOperator /Generic.PHP.BacktickOperator Bans the use of the backtick execution operator.
PHP.CharacterBeforePHPOpeningTag /Generic.PHP.CharacterBeforePHPOpeningTag Checks that the opening PHP tag is the first content in a file.
PHP.ClosingPHPTag /Generic.PHP.ClosingPHPTag Checks that open PHP tags are paired with closing tags.
PHP.CommentedOutCode /Squiz.PHP.CommentedOutCode Warn about commented out code.
PHP.DeprecatedFunctions /Generic.PHP.DeprecatedFunctions Discourages the use of deprecated PHP functions.
PHP.DisallowAlternativePHPTags /Generic.PHP.DisallowAlternativePHPTags Verifies that no alternative PHP tags are used.
PHP.DisallowBooleanStatement /Squiz.PHP.DisallowBooleanStatement Ensures that boolean operators are only used inside control structure conditions.
PHP.DisallowComparisonAssignment /Squiz.PHP.DisallowComparisonAssignment Ensures that the value of a comparison is not assigned to a variable.
PHP.DisallowInlineIf /Squiz.PHP.DisallowInlineIf Stops inline IF statements from being used.
PHP.DisallowMultipleAssignments /Squiz.PHP.DisallowMultipleAssignments Ensures there is only one assignment on a line, and that it is the first thing on the line.
PHP.DisallowObEndFlush /Squiz.PHP.DisallowObEndFlush Checks the indenting used when an ob_start() call occurs.
PHP.DisallowShortOpenTag /Generic.PHP.DisallowShortOpenTag Makes sure that shorthand PHP open tags are not used.
PHP.DisallowSizeFunctionsInLoops /Squiz.PHP.DisallowSizeFunctionsInLoops Bans the use of size-based functions in loop conditions.
PHP.DiscouragedFunctions /Squiz.PHP.DiscouragedFunctions Discourages the use of debug functions.
PHP.EmbeddedPhp /Squiz.PHP.EmbeddedPhp Checks the indentation of embedded PHP code segments.
PHP.Eval /Squiz.PHP.Eval The use of eval() is discouraged.
PHP.EvalObjectFactory /MySource.PHP.EvalObjectFactory Ensures that eval() is not used to create objects.
PHP.ForbiddenFunctions /Squiz.PHP.ForbiddenFunctions Discourages the use of alias functions.
PHP.GetRequestData /MySource.PHP.GetRequestData Ensures that getRequestData() is used to access super globals.
PHP.GlobalKeyword /Squiz.PHP.GlobalKeyword Stops the usage of the "global" keyword.
PHP.Heredoc /Squiz.PHP.Heredoc Bans the use of heredocs and nowdocs.
PHP.InnerFunctions /Squiz.PHP.InnerFunctions Ensures that functions within functions are never used.
PHP.LowerCaseConstant /Generic.PHP.LowerCaseConstant Checks that all uses of true, false and null are lowercase.
PHP.LowerCaseKeyword /Generic.PHP.LowerCaseKeyword Checks that all PHP keywords are lowercase.
PHP.LowercasePHPFunctions /Squiz.PHP.LowercasePHPFunctions Ensures all calls to inbuilt PHP functions are lowercase.
PHP.NoSilencedErrors /Generic.PHP.NoSilencedErrors Throws an error or warning when any code prefixed with an asperand is encountered.
PHP.NonExecutableCode /Squiz.PHP.NonExecutableCode Warns about code that can never been executed.
PHP.ReturnFunctionValue /MySource.PHP.ReturnFunctionValue Warns when function values are returned directly.
PHP.SAPIUsage /Generic.PHP.SAPIUsage Ensures the PHP_SAPI constant is used instead of php_sapi_name().
PHP.Syntax /Generic.PHP.Syntax Ensures PHP believes the syntax is clean.
PHP.UpperCaseConstant /Generic.PHP.UpperCaseConstant Checks that all uses of TRUE, FALSE and NULL are uppercase.
Scope.MemberVarScope /Squiz.Scope.MemberVarScope Verifies that class members have scope modifiers.
Scope.MethodScope /Squiz.Scope.MethodScope Verifies that class methods have scope modifiers.
Scope.StaticThisUsage /Squiz.Scope.StaticThisUsage Checks for usage of $this in static methods, which will cause runtime errors.
Strings.ConcatenationSpacing /Squiz.Strings.ConcatenationSpacing Makes sure there are no spaces around the concatenation operator.
Strings.DoubleQuoteUsage /Squiz.Strings.DoubleQuoteUsage Makes sure that any use of double quotes strings are warranted.
Strings.EchoedStrings /Squiz.Strings.EchoedStrings Makes sure that any strings that are "echoed" are not enclosed in brackets.
Strings.JoinStrings /MySource.Strings.JoinStrings Ensures that strings are not joined using array.join().
Strings.UnnecessaryStringConcat /Generic.Strings.UnnecessaryStringConcat Checks that two strings are not concatenated together; suggests using one string instead.
VersionControl.SubversionProperties /Generic.VersionControl.SubversionProperties Tests that the correct Subversion properties are set.
WhiteSpace.CastSpacing /Squiz.WhiteSpace.CastSpacing Ensure cast statements don't contain whitespace.
WhiteSpace.ControlStructureSpacing /Squiz.WhiteSpace.ControlStructureSpacing Checks that control structures have the correct spacing around brackets.
WhiteSpace.DisallowSpaceIndent /Generic.WhiteSpace.DisallowSpaceIndent Throws errors if spaces are used for indentation other than precision indentation.
WhiteSpace.DisallowTabIndent /Generic.WhiteSpace.DisallowTabIndent Throws errors if tabs are used for indentation.
WhiteSpace.FunctionClosingBraceSpace /Squiz.WhiteSpace.FunctionClosingBraceSpace Checks that there is one empty line before the closing brace of a function.
WhiteSpace.FunctionOpeningBraceSpace /Squiz.WhiteSpace.FunctionOpeningBraceSpace Checks that there is no empty line after the opening brace of a function.
WhiteSpace.FunctionSpacing /Squiz.WhiteSpace.FunctionSpacing Checks the separation between methods in a class or interface.
WhiteSpace.LanguageConstructSpacing /Squiz.WhiteSpace.LanguageConstructSpacing Ensures all language constructs contain a single space between themselves and their content.
WhiteSpace.LogicalOperatorSpacing /Squiz.WhiteSpace.LogicalOperatorSpacing Verifies that operators have valid spacing surrounding them.
WhiteSpace.MemberVarSpacing /Squiz.WhiteSpace.MemberVarSpacing Verifies that class members are spaced correctly.
WhiteSpace.ObjectOperatorIndent /PEAR.WhiteSpace.ObjectOperatorIndent Checks that object operators are indented correctly.
WhiteSpace.ObjectOperatorSpacing /Squiz.WhiteSpace.ObjectOperatorSpacing Ensure there is no whitespace before/after an object operator.
WhiteSpace.OperatorSpacing /Squiz.WhiteSpace.OperatorSpacing Verifies that operators have valid spacing surrounding them.
WhiteSpace.PropertyLabelSpacing /Squiz.WhiteSpace.PropertyLabelSpacing Ensures that a property or label colon has a single space after it and no space before it.
WhiteSpace.ScopeClosingBrace /Squiz.WhiteSpace.ScopeClosingBrace Checks that the closing braces of scopes are aligned correctly.
WhiteSpace.ScopeIndent /PEAR.WhiteSpace.ScopeIndent Checks that control structures are structured and indented correctly.
WhiteSpace.ScopeKeywordSpacing /Squiz.WhiteSpace.ScopeKeywordSpacing Ensure there is a single space after scope keywords.
WhiteSpace.SemicolonSpacing /Squiz.WhiteSpace.SemicolonSpacing Ensure there is no whitespace before a semicolon.
WhiteSpace.SuperfluousWhitespace /Squiz.WhiteSpace.SuperfluousWhitespace Checks for unneeded whitespace.
AlphanumericFilename. Files.AlphanumericFilename. /
Annotations. Commenting.Annotations. /
Arguments. Functions.Arguments. /
AssignmentSpacing. WhiteSpace.AssignmentSpacing. /
BinaryOperatorSpacing. WhiteSpace.BinaryOperatorSpacing. /
BlankLineBeforeReturn. Formatting.BlankLineBeforeReturn. /
ClassComment. Commenting.ClassComment. /
CommaSpacing. WhiteSpace.CommaSpacing. /
DiscourageFitzinator. WhiteSpace.DiscourageFitzinator. /
ExceptionMessage. Errors.ExceptionMessage. /
FunctionComment. Commenting.FunctionComment. /
IdenticalComparison. ControlStructure.IdenticalComparison. /
License. Commenting.License. /
MethodScope. Scope.MethodScope. /
MultiLineArrayComma. Arrays.MultiLineArrayComma. This file is part of the Symfony-coding-standard (phpcs standard)
MultipleClassesOneFile. Classes.MultipleClassesOneFile. /
ObjectInstantiation. Objects.ObjectInstantiation. /
PropertyDeclaration. Classes.PropertyDeclaration. /
ReturnOrThrow. Formatting.ReturnOrThrow. /
ReturnType. Functions.ReturnType. /
ScopeOrder. Functions.ScopeOrder. /
TypeHinting. Commenting.TypeHinting. /
UnaryOperators. ControlStructure.UnaryOperators. /
UserDeprecated. Errors.UserDeprecated. /
ValidClassName. NamingConventions.ValidClassName. /
YodaConditions. ControlStructure.YodaConditions. /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment