Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
| 1 | <?php |
||
| 3 | View Code Duplication | class Kint_Renderer_Text_DepthLimit extends Kint_Renderer_Text_Plugin |
|
| 4 | { |
||
| 5 | public function render($o) |
||
| 17 | } |
||
| 18 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.