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
- Try integrating it in your IDE like PHPStorm: http://blog.jetbrains.com/webide/2012/12/php-mess-detector-support/
- Use it in your Continuous Integration application like Jenkins!