Skip to content

Instantly share code, notes, and snippets.

@kevcha
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevcha/41d3c045d2016c99ec75 to your computer and use it in GitHub Desktop.
Save kevcha/41d3c045d2016c99ec75 to your computer and use it in GitHub Desktop.
Phpcs

Generic

Classes

DuplicateClassName : Reports errors if the same class or interface name is used in multiple files

CodeAnalysis

EmptyStatementSniff : Reports errors if the a statement is empty (only whitespaces or comments)

ForLoopShouldBeWhileLoopSniff : This rule is based on the PMD rule catalog. Detects for-loops that can be simplified as a while-loop.

ForLoopWithTestFunctionCallSniff : This rule is based on the PMD rule catalog. Detects for-loops that use a function call in the test expression.

JumbledIncrementerSniff : This rule is based on the PMD rule catalog. The jumbling incrementer sniff detects the usage of one and the same incrementer into an outer and an inner loop. Even it is intended this is confusing code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment