Codor
Codor copied to clipboard
Custom PHPCS sniffs to find Code Smells
Checks if `if` statement has too many conditions.
Instead of using `new` should be using DI. Should this be sniffed out?
From @Exadra37 Using set methods in a class is not advised, because: - if the class is instantiated and we forget to call the set methods it may work or...
For example, if you want to prevent method calls like: `DB::statement` or `DB::raw` Would be nice if in the sniff XML file you can provide a list of the calls...
* ~~Add code examples for each sniff.~~ Done * Show how to run individual sniffs or exclude individual sniffs. * For each sniff show how to customize if applicable. *...
The current `Codor.Classes.ClassLength` simply counts the number of lines between the opening `{` and the closing `}` of a class. Sometimes the number of doc blocks plus a number of...
Like this: ``` array = [ 'foo' => 1, 'bar' => 2, 'foo'=> 3, ]; ```
* Blank lines at start/end of function/method * Blank lines before/after function/method * Blank lines after class declaration. * Blank lines around namespaces/use statement.
Just a warning to suggest to the developer to see if an object could be returned instead.