phpmd/phpmd

composer require phpmd/phpmd

What is phpmd?
->It points out potential bugs, suboptimal code, complex expressions, unused parameters, methods, and properties.

About rulesets
The rule set that can be sepecified by PHPMD is as follows.

Clean code rule: cleancode
will point out about the dirty code.

Code size rule: codesize
Attempts to reduce code size by splitting if there are too many methods or large classes.

Discussion rule: controversial
Point out to use the camel case about the camel case and snake case that are often regarded as a problem in developing with PHP

Design rules:
Design issues that are related to software design.

Naming rule: naming
Point out long names, conversely short names etc.

Unused code rule: unusedcode
Find and point out unused code.