Scan a file or directory for problems using comma-separated rulesets

phpmd

  • A PHP mess detector that checks for common potential problems.
    More information: <https://github.com/phpmd/phpmd>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}}

click the source code to copy install phpmd on any operating system with command-not-found.com