Forrest logo
back to the phpmd tool

phpmd:tldr:0302d

phpmd: Include only the specified extensions in analysis.
$ phpmd ${filename_or_directory} ${xml|text|html} ${rulesets} --suffixes ${extensions}
try on your machine

This command runs the PHP Mess Detector (phpmd) tool on a given file or directory specified by the ${filename_or_directory} parameter. The ${xml|text|html} parameter specifies the desired output format of the analysis report, which can be either XML, plain text, or HTML.

The ${rulesets} parameter specifies the set of rules or standards that the tool should apply during the analysis. Different rulesets can be chosen based on coding standards or specific quality criteria.

The --suffixes option is used to specify the file extensions that should be considered for the analysis. It is followed by the ${extensions} parameter, which should contain a comma-separated list of file extensions to be included.

In summary, this command executes PHP Mess Detector with the specified parameters to analyze the PHP code in the given file or directory, producing an analysis report in the desired output format and applying the chosen rulesets to assess code quality.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the phpmd tool