← Tilbage til værktøjer
PHPMD
PHP Mess Detector - finder code smells, kompleksitet og design problemer
Version: 2.x
Foto: Markus Winkler / Unsplash
Features
- +Code smell detection
- +Cyclomatic complexity metrics
- +Unused code detection
- +Naming convention checks
- +Design rule violations
- +Customizable rule sets
- +XML/HTML/JSON output
- +CI/CD integration
- +Configurable thresholds
- +Multiple built-in rulesets
Installation
composer require --dev phpmd/phpmdAlmindelige Kommandoer
phpmd src text cleancode - Check clean code rulesphpmd src html codesize - Generate HTML reportphpmd src text unusedcode - Find unused codephpmd src text naming - Check naming conventionsphpmd src text controversial,design - Multiple rulesetsphpmd src xml codesize --reportfile report.xml - Export to XML
Use Cases
- •Detect overly complex methods
- •Find unused parameters and variables
- •Enforce naming conventions
- •Identify design problems
- •Monitor code quality metrics
- •Prevent technical debt