IngmarBoddington
4/25/2013 - 10:48 AM

phpmd / PHP_Depends - Setup / Use

phpmd / PHP_Depends - Setup / Use

Installation using pear:

- pear channel-discover pear.pdepend.org
- pear install pdepend/PHP_Depend
- pear channel-discover pear.phpmd.org
- pear install --alldeps phpmd/PHP_PMD

Then to run (with all default rulesets):

  Text to stdout: 
    phpmd <file/directory> text codesize,unusedcode,naming,controversial,design

  HTML file:
    phpmd <file/directory> html codesize,unusedcode,naming,controversial,design > <output>


References:
- http://pdepend.org/
- http://phpmd.org/