PHPUnit as a Project Mess Detector

PMD, also known as Project Mess Detector, is a popular tool in the Java world that scans Java source code and looks for potential problems. It is well integrated with other tools such as Eclipse or CruiseControl, making the collected information available at multiple points throughout the development process. Why am I blogging about this? Well. As of version 3.2, PHPUnit will not only be able to calculate and collect a variety of software metrics. It will also be able to report violations of rules that are based on these metrics in PMD's XML format. This information can then be fed to any tool that integrates with PMD. For starters I implemented the code size rules that take, among other information, the Lines of Executable Code (ELOC), Cyclomatic Complexity, and NPath Complexity metrics into account.