programming

Install PHP Mess Detector (phpmd)

What is PHP Mess Detector? Given its homepage, it aims to detect:

  • Possible bugs
  • Suboptimal code
  • Overcomplicated expressions
  • Unused parameters, methods, properties

In short: it helps by pointing you on the mess inside your PHP scripts!

Listing available packages:

$ pear channel-discover pear.phpmd.org
$ pear channel-discover pear.pdepend.org
 Adding Channel "pear.phpmd.org" succeeded
 Discovery of channel "pear.phpmd.org" succeeded
 Adding Channel "pear.phpmd.org" succeeded

Now, check which packages (and versions) are available on the server.

$ pear remote-list -c phpmd
Channel phpmd Available packages: 
================================= 
Package Version PHP_PMD 1.4.1

Install the latest version

$ sudo pear install --alldeps phpmd/PHP_PMD

Now what?

0 Shares

One thought on “Install PHP Mess Detector (phpmd)

Leave a Reply

Your email address will not be published. Required fields are marked *