We should look at implementing the following linter rules as part of `ArcanistXHPASTLinter`:
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php | Generic_Sniffs_Classes_DuplicateClassNameSniff]]: Reports errors if the same class or interface name is used in multiple files.~~ This is essentially `ArcanistPhutilLibraryLinter::LINT_DUPLICATE_SYMBOL`.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php | Generic_Sniffs_CodeAnalysis_EmptyStatementSniff]]: This sniff class detected empty statement.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php | Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff]]: Detects `for`-loops that can be simplified as a `while`-loop.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php | Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff]]: Detects `for`-loops that use a function call in the test expression.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php | Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff]]: Detects incrementer jumbling in `for` loops.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php | Generic_Sniffs_CodeAnalysis_UnconditionalIfStatementSniff]]: Detects unconditional `if` and `elseif` statements.~~ `ArcanistXHPASTLinter::LINT_TAUTOLOGICAL_EXPRESSION`
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php | Generic_Sniffs_CodeAnalysis_UnnecessaryFinalModifierSniff]]: Detects unnecessary `final` modifiers inside of `final` classes.~~ `ArcanistXHPASTLinter::LINT_UNNECESSARY_FINAL_MODIFIER`
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php | Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff]]: Checks the for unused function parameters.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php | Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff]]: Detects unnecessary overridden methods that simply call their parent.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php | Generic_Sniffs_Commenting_DocCommentSniff]]: Ensures doc blocks follow basic formatting.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Commenting/FixmeSniff.php | Generic_Sniffs_Commenting_FixmeSniff]]: Warns about `FIXME` comments.~~
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Commenting/TodoSniff.php | Generic_Sniffs_Commenting_TodoSniff]]: Warns about `TODO` comments.~~ `ArcanistXHPASTLinter::LINT_TODO_COMMENT`
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php | Generic_Sniffs_ControlStructures_InlineControlStructureSniff]]: Verifies that inline control statements are not present.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php | Generic_Sniffs_Files_ByteOrderMarkSniff]]: A simple sniff for detecting BOMs that may corrupt application work.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php | Generic_Sniffs_Files_EndFileNewlineSniff]]: Ensures the file ends with a newline character.~~ `ArcanistTextLinter::LINT_EOF_NEWLINE`
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php | Generic_Sniffs_Files_EndFileNoNewlineSniff]]: Ensures the file does not end with a newline character.~~
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php | Generic_Sniffs_Files_InlineHTMLSniff]]: Ensures the whole file is PHP only, with no whitespace or inline HTML anywhere in the file.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/LineEndingsSniff.php | Generic_Sniffs_Files_LineEndingsSniff]]: Checks that end of line characters are correct.~~ `ArcanistTextLinter::LINT_DOS_NEWLINE`
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/LineLengthSniff.php | Generic_Sniffs_Files_LineLengthSniff]]: Checks all lines in the file, and throws warnings if they are over 80 characters in length and errors if they are over 100.~~ `ArcanistTextLinter::LINT_LINE_WRAP`
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php | Generic_Sniffs_Files_LowercasedFilenameSniff]]: Checks that all file names are lowercased.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php | Generic_Sniffs_Files_OneClassPerFileSniff]]: Checks that only one class is declared per file.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php | Generic_Sniffs_Files_OneInterfacePerFileSniff]]: Checks that only one interface is declared per file.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php | Generic_Sniffs_Files_OneTraitPerFileSniff]]: Checks that only one trait is declared per file.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php | Generic_Sniffs_Formatting_DisallowMultipleStatementsSniff]]: Ensures each statement is on a line by itself.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php | Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff]]: Checks alignment of assignments.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php | Generic_Sniffs_Formatting_NoSpaceAfterCastSniff]]: Ensures there is no space after cast tokens.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php | Generic_Sniffs_Formatting_SpaceAfterCastSniff]]: Ensures there is a single space after cast tokens.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php | Generic_Sniffs_Functions_CallTimePassByReferenceSniff]]: Ensures that variables are not passed by reference when calling a function.~~ `ArcanistXHPASTLinter::LINT_CALL_TIME_PASS_BY_REF`
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php | Generic_Sniffs_Functions_FunctionCallArgumentSpacingSniff]]: Checks that calls to methods and functions are spaced correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php | Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff]]: Checks that the opening brace of a function is on the line after the function declaration.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php | Generic_Sniffs_Functions_OpeningFunctionBraceKernighanRitchieSniff]]: Checks that the opening brace of a function is on the same line as the function declaration.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php | Generic_Sniffs_Metrics_CyclomaticComplexitySniff]]: Checks the cyclomatic complexity for functions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php | Generic_Sniffs_Metrics_NestingLevelSniff]]: Checks the nesting level for methods.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php | Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff]]: Ensures method names are correct depending on whether they are `public` or `private`, and that functions are named correctly.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php | Generic_Sniffs_NamingConventions_ConstructorNameSniff]]: Favor PHP 5 constructor syntax, which uses `function __construct()`. Avoid PHP 4 constructor syntax, which uses `function ClassName()`.~~ `ArcanistXHPASTLinter::LINT_IMPLICIT_CONSTRUCTOR`
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php | Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff]]: Ensures that constant names are all uppercase.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php | Generic_Sniffs_PHP_CharacterBeforePHPOpeningTagSniff]]: Checks that the opening PHP tag is the first content in a file.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php | Generic_Sniffs_PHP_ClosingPHPTagSniff]]: Checks that open PHP tags are paired with closing tags.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php | Generic_Sniffs_PHP_DeprecatedFunctionsSniff]]: Discourages the use of deprecated functions that are kept in PHP for compatibility with older versions.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php | Generic_Sniffs_PHP_DisallowShortOpenTagSniff]]: Makes sure that shorthand PHP open tags are not used.~~ `ArcanistXHPASTLinter::LINT_PHP_SHORT_TAG`
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php | Generic_Sniffs_PHP_ForbiddenFunctionsSniff]]: Discourages the use of alias functions that are kept in PHP for compatibility with older versions. Can be used to forbid the use of any function.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php | Generic_Sniffs_PHP_LowerCaseConstantSniff]]: Checks that all uses of `true`, `false` and `null` are lowercase.~~ `ArcanistXHPASTLinter::LINT_KEYWORD_CASING`
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php | Generic_Sniffs_PHP_LowerCaseKeywordSniff]]: Checks that all PHP keywords are lowercase.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php | Generic_Sniffs_PHP_NoSilencedErrorsSniff]]: Throws an error or warning when any code prefixed with an asperand is encountered.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php | Generic_Sniffs_PHP_SAPIUsageSniff]]: Ensures the `PHP_SAPI` constant is used instead of `php_sapi_name()`.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/SyntaxSniff.php | Generic_Sniffs_PHP_SyntaxSniff]]: Ensures PHP believes the syntax is clean.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php | Generic_Sniffs_PHP_UpperCaseConstantSniff]]: Checks that all uses of `TRUE`, `FALSE` and `NULL` are uppercase.~~
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php | Generic_Sniffs_Strings_UnnecessaryStringConcatSniff]]: Checks that two strings are not concatenated together; suggests using one string instead.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php | Generic_Sniffs_VersionControl_SubversionPropertiesSniff]]: Tests that the correct Subversion properties are set.~~
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php | Generic_Sniffs_WhiteSpace_DisallowSpaceIndentSniff]]: Throws errors if spaces are used for indentation.~~
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php | Generic_Sniffs_WhiteSpace_DisallowTabIndentSniff]]: Throws errors if tabs are used for indentation.~~ `ArcanistTextLinter::LINT_TAB_LITERAL`
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php | Generic_Sniffs_WhiteSpace_ScopeIndentSniff]]: Checks that control structures are structured correctly, and their content is indented correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php | MySource_Sniffs_Channels_DisallowSelfActionsSniff]]: Ensures that `self` and `static` are not used to call public methods in action classes.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php | MySource_Sniffs_Channels_IncludeOwnSystemSniff]]: Ensures that a system does not include itself.~~
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php | MySource_Sniffs_Channels_IncludeSystemSniff]]: Ensures that systems, asset types and libs are included before they are used.~~
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php | MySource_Sniffs_Channels_UnusedSystemSniff]]: Ensures that systems and asset types are used if they are included.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php | MySource_Sniffs_Commenting_FunctionCommentSniff]]: Parses and verifies the doc comments for functions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php | MySource_Sniffs_Debug_DebugCodeSniff]]: Warns about the use of debug code.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php | MySource_Sniffs_Objects_DisallowNewWidgetSniff]]: Ensures that widgets are not manually created.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php | MySource_Sniffs_PHP_AjaxNullComparisonSniff]]: Ensures that values submitted via JS are not compared to `null`.~~
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php | MySource_Sniffs_PHP_EvalObjectFactorySniff]]: Ensures that `eval()` is not used to create objects.~~
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php | MySource_Sniffs_PHP_GetRequestDataSniff]]: Ensures that `getRequestData()` is used to access super globals.~~
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php | MySource_Sniffs_PHP_ReturnFunctionValueSniff]]: Warns when function values are returned directly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php | PEAR_Sniffs_Classes_ClassDeclarationSniff]]: Checks the declaration of the class is correct.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php | PEAR_Sniffs_Commenting_ClassCommentSniff]]: Parses and verifies the doc comments for classes.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php | PEAR_Sniffs_Commenting_FileCommentSniff]]: Parses and verifies the doc comments for files.~~
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php | PEAR_Sniffs_Commenting_FunctionCommentSniff]]: Parses and verifies the doc comments for functions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php | PEAR_Sniffs_Commenting_InlineCommentSniff]]: Checks that no perl-style comments are used.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php | PEAR_Sniffs_ControlStructures_ControlSignatureSniff]]: Verifies that control statements conform to their coding standards.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php | PEAR_Sniffs_ControlStructures_MultiLineConditionSniff]]: Ensure multi-line IF conditions are defined correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php | PEAR_Sniffs_Files_IncludingFileSniff]]: Checks that the `include_once` is used in conditional situations, and `require_once` is used elsewhere. Also checks that brackets do not surround the file being included.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php | PEAR_Sniffs_Formatting_MultiLineAssignmentSniff]]: If an assignment goes over two lines, ensure the equal sign is indented.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php | PEAR_Sniffs_Functions_FunctionCallSignatureSniff]]
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php | PEAR_Sniffs_Functions_FunctionDeclarationSniff]]: Ensure single and multi-line function declarations are defined correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php | PEAR_Sniffs_Functions_ValidDefaultValueSniff]]: A sniff to ensure that parameters defined for a function that have a default value come at the end of the function signature.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php | PEAR_Sniffs_NamingConventions_ValidClassNameSniff]]: Ensures class and interface names start with a capital letter and use `_` separators.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php | PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff]]: Ensures method names are correct depending on whether they are `public` or `private`, and that functions are named correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php | PEAR_Sniffs_NamingConventions_ValidVariableNameSniff]]: Checks the naming of member variables.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php | PEAR_Sniffs_WhiteSpace_ObjectOperatorIndentSniff]]: Checks that object operators are indented 4 spaces if they are the first thing on a line.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php | PEAR_Sniffs_WhiteSpace_ScopeClosingBraceSniff]]: Checks that the closing braces of scopes are aligned correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php | PEAR_Sniffs_WhiteSpace_ScopeIndentSniff]]: Checks that control structures are structured correctly, and their content is indented correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php | Squiz_Sniffs_Arrays_ArrayBracketSpacingSniff]]: Ensure that there are no spaces around square brackets.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php | Squiz_Sniffs_Arrays_ArrayDeclarationSniff]]: A test to ensure that arrays conform to the array coding standard.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php | Squiz_Sniffs_Classes_ClassDeclarationSniff]]: Checks the declaration of the class and its inheritance is correct.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php | Squiz_Sniffs_Classes_ClassFileNameSniff]]: Tests that the file name and the name of the class contained within the file match.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php | Squiz_Sniffs_Classes_LowercaseClassKeywordsSniff]]: Ensures all class keywords are lowercase.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php | Squiz_Sniffs_Classes_SelfMemberReferenceSniff]]: Tests `self` member references.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php | Squiz_Sniffs_Classes_ValidClassNameSniff]]: Ensures classes are in camel caps, and the first letter is capitalised.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php | Squiz_Sniffs_Commenting_BlockCommentSniff]]: Verifies that block comments are used appropriately.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php | Squiz_Sniffs_Commenting_ClassCommentSniff]]: Parses and verifies the class doc comment.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php | Squiz_Sniffs_Commenting_ClosingDeclarationCommentSniff]]: Checks the `//end ...` comments on classes, interfaces and functions.~~
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php | Squiz_Sniffs_Commenting_DocCommentAlignmentSniff]]: Tests that the stars in a doc comment align correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php | Squiz_Sniffs_Commenting_EmptyCatchCommentSniff]]: Checks for empty `catch` clause.
- ~~[[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php | Squiz_Sniffs_Commenting_FileCommentSniff]]: Parses and verifies the file doc comment.~~
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php | Squiz_Sniffs_Commenting_FunctionCommentSniff]]: Parses and verifies the doc comments for functions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php | Squiz_Sniffs_Commenting_FunctionCommentThrowTagSniff]]: Verifies that a `@throws` tag exists for a function that throws exceptions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php | Squiz_Sniffs_Commenting_InlineCommentSniff]]: Checks that there is adequate spacing between comments.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php | Squiz_Sniffs_Commenting_LongConditionClosingCommentSniff]]
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php | Squiz_Sniffs_Commenting_PostStatementCommentSniff]]: Checks to ensure that there are no comments after statements.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php | Squiz_Sniffs_Commenting_VariableCommentSniff]]: Parses and verifies the variable doc comment.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php | Squiz_Sniffs_ControlStructures_ControlSignatureSniff]]: Verifies that control statements conform to their coding standards.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php | Squiz_Sniffs_ControlStructures_ElseIfDeclarationSniff]]: Verifies that there are not `elseif` statements.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php | Squiz_Sniffs_ControlStructures_ForEachLoopDeclarationSniff]]: Verifies that there is a space between each condition of `foreach` loops.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php | Squiz_Sniffs_ControlStructures_ForLoopDeclarationSniff]]: Verifies that there is a space between each condition of `for` loops.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php | Squiz_Sniffs_ControlStructures_InlineIfDeclarationSniff]]: Tests the spacing of shorthand IF statements.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php | Squiz_Sniffs_ControlStructures_LowercaseDeclarationSniff]]: Ensures all control structure keywords are lowercase.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php | Squiz_Sniffs_ControlStructures_SwitchDeclarationSniff]]: Ensures all the `break`s and `case`s are aligned correctly according to their parent `switch`'s alignment and enforces other switch formatting.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php | Squiz_Sniffs_Files_FileExtensionSniff]]: Tests that classes and interfaces are not declared in `.php` files.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php | Squiz_Sniffs_Formatting_OperatorBracketSniff]]: Tests that all arithmetic operations are bracketed.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php | Squiz_Sniffs_Functions_FunctionDeclarationArgumentSpacingSniff]]: Checks that arguments in function declarations are spaced correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php | Squiz_Sniffs_Functions_FunctionDeclarationSniff]]: Checks the function declaration is correct.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php | Squiz_Sniffs_Functions_FunctionDuplicateArgumentSniff]]: Checks that duplicate arguments are not used in function declarations.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php | Squiz_Sniffs_Functions_GlobalFunctionSniff]]: Tests for functions outside of classes.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php | Squiz_Sniffs_Functions_LowercaseFunctionKeywordsSniff]]: Ensures all class keywords are lowercase.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php | Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff]]: Ensure single and multi-line function declarations are defined correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php | Squiz_Sniffs_NamingConventions_ValidFunctionNameSniff]]: Ensures method names are correct depending on whether they are `public` or `private`, and that functions are named correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php | Squiz_Sniffs_NamingConventions_ValidVariableNameSniff]]: Checks the naming of variables and member variables.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php | Squiz_Sniffs_Objects_ObjectInstantiationSniff]]: Ensures objects are assigned to a variable when instantiated.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php | Squiz_Sniffs_Operators_ComparisonOperatorUsageSniff]]: A Sniff to enforce the use of identical (`===`) type operators rather than equal (`==`) operators.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php | Squiz_Sniffs_Operators_IncrementDecrementUsageSniff]]: Tests that the `++` operators are used when possible and not used when it makes the code confusing.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php | Squiz_Sniffs_Operators_ValidLogicalOperatorsSniff]]: Checks to ensure that the logical operators `and` and `or` are not used. Use the `&&` and `||` operators instead.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php | Squiz_Sniffs_PHP_CommentedOutCodeSniff]]: Warn about commented out code.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php | Squiz_Sniffs_PHP_DisallowObEndFlushSniff]]: Checks the indenting used when an `ob_start()` call occurs.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php | Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff]]: Bans the use of size-based functions in loop conditions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php | Squiz_Sniffs_PHP_DiscouragedFunctionsSniff]]: Discourages the use of debug functions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php | Squiz_Sniffs_PHP_EvalSniff]]: The use of `eval()` is discouraged.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php | Squiz_Sniffs_PHP_ForbiddenFunctionsSniff]]: Discourages the use of alias functions that are kept in PHP for compatibility with older versions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php | Squiz_Sniffs_PHP_GlobalKeywordSniff]]: Stops the usage of the `global` keyword.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php | Squiz_Sniffs_PHP_InnerFunctionsSniff]]: Ensures that functions within functions are never used.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php | Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff]]: Ensures all calls to inbuilt PHP functions are lowercase.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php | Squiz_Sniffs_PHP_NonExecutableCodeSniff]]: Warns about code that can never been executed.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php | Squiz_Sniffs_Scope_MemberVarScopeSniff]]: Verifies that class members have scope modifiers.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php | Squiz_Sniffs_Scope_MethodScopeSniff]]: Verifies that class methods have scope modifiers.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php | Squiz_Sniffs_Scope_StaticThisUsageSniff]]: Checks for usage of `$this` in static methods.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php | Squiz_Sniffs_Strings_ConcatenationSpacingSniff]]: Makes sure there are no spaces between the concatenation operator and the strings being concatenated.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php | Squiz_Sniffs_Strings_DoubleQuoteUsageSniff]]: Makes sure that any use of double quotes are warranted.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php | Squiz_Sniffs_Strings_EchoedStringsSniff]]: Makes sure that any strings that are "echoed" are not enclosed in brackets like a function call.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php | Squiz_Sniffs_WhiteSpace_CastSpacingSniff]]: Ensure cast statements don't contain whitespace.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php | Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff]]: Checks that control structures have the correct spacing around brackets.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php | Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff]]: Checks that there is one empty line before the closing brace of a function.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php | Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff]]: Checks that there is no empty line after the opening brace of a function.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php | Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff]]: Checks the separation between methods in a class or interface.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php | Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff]]: Ensures all language constructs (without brackets) contain a single space between themselves and their content.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php | LogicalOperatorSpacingSniff]]: Verifies that operators have valid spacing surrounding them.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php | Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff]]: Verifies that class members are spaced correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php | Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff]]: Ensure there is no whitespace before a semicolon.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php | Squiz_Sniffs_WhiteSpace_Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff]]: Verifies that operators have valid spacing surrounding them.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSnSquiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniffiff.php | Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff]]: Ensures that the colon in a property or label definition has a single space after it and no space before it.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php | Squiz_Sniffs_WhiteSpace_ScopeClosingBraceSniff]]: Checks that the closing braces of scopes are aligned correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php | Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff]]: Ensure there is a single space after scope keywords.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php | Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff]]: Ensure there is no whitespace before a semicolon.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php | Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff]]: Checks that no whitespace proceeds the first content of the file, exists after the last content of the file, resides after content on any line, or are two empty lines in functions.