Rule |
Description |
KPI |
URL |
ExitExpression |
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment. |
Robustness |
https://phpmd.org/rules/design.html |
GotoStatement |
Goto makes code harder to read and it is nearly impossible to understand the control flow of an application that uses this language construct. Therefore it should be avoided. Consider to replace Goto with regular control structures and separate methods/function, which are easier to read. |
Robustness |
https://phpmd.org/rules/design.html |
NumberOfChildren |
A class with an excessive number of children is an indicator for an unbalanced class hierarchy. You should consider to refactor this class hierarchy. |
Robustness |
https://phpmd.org/rules/design.html |
DepthOfInheritance |
A class with many parents is an indicator for an unbalanced and wrong class hierarchy. You should consider to refactor this class hierarchy. |
Robustness |
https://phpmd.org/rules/design.html |
CouplingBetweenObjects |
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability |
Robustness |
https://phpmd.org/rules/design.html |
DevelopmentCodeFragment |
Functions like var_dump(), print_r() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten. |
Robustness |
https://phpmd.org/rules/design.html |