← Tilbage til værktøjer

PHPMD

PHP Mess Detector - finder code smells, kompleksitet og design problemer

Version: 2.x

✨ 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/phpmd

⚡ Almindelige Kommandoer

  • phpmd src text cleancode - Check clean code rules
  • phpmd src html codesize - Generate HTML report
  • phpmd src text unusedcode - Find unused code
  • phpmd src text naming - Check naming conventions
  • phpmd src text controversial,design - Multiple rulesets
  • phpmd 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

ℹ️ Quick Info

Kategori
Code Quality
Version
2.x
Sværhedsgrad
Begynder-venlig