LinuxCommandLibrary

phpmd

PHP Mess Detector

TLDR

Check for issues

$ phpmd [src/] text [cleancode,codesize]
copy
Generate HTML report
$ phpmd [src/] html [rulesets] --reportfile [report.html]
copy
Use ruleset file
$ phpmd [src/] text [phpmd.xml]
copy
Exclude directory
$ phpmd [src/] text [rulesets] --exclude [vendor]
copy

SYNOPSIS

phpmd source format rulesets [options]

DESCRIPTION

phpmd is PHP Mess Detector. Finds potential problems in code.
The tool detects code smells. Complexity and design issues.

PARAMETERS

SOURCE

Source files or directory.
FORMAT
Output format (text, xml, html).
RULESETS
Rules to apply.
--reportfile FILE
Output file.
--exclude PATTERN
Exclude pattern.
--help
Display help.

CAVEATS

Configurable rules. Can produce false positives.

HISTORY

PHPMD was created for detecting PHP code issues and maintainability problems.

SEE ALSO

phpcs(1), phan(1), phpstan(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community