Search code examples
phpphpunitcode-coveragephpdoc

Including phpunit code coverage in phpdoc output


For the past while I've been using phpdoc, phpunit (with xdebug for code coverage generation) and pdepend to produce documentation and code metrics. I can't help but think that things look a bit disjointed. Ideally I'd like to integrate the code coverage reports, test results and metrics together in one place — with the phpdoc output. I'm not using any CI system.

Is there anything that can help me achieve what I want to do or do I basically need to start hacking away at phpdoc and/or smarty templates?


Solution

  • I don't think there is a tool for combining phpdoc and the phpunit code coverage.

    For the other tools you can check out "phpcb" - The PHP Code Browser.

    It will combine the result from "PHP Code Sniffer", "PHP Mess Detector" and PHPUnits "CRAP" index by giving you a source code browser where you can look at the code an all the errors in one place.

    Screenshots from a sample project:

    phpcb-overview-page

    phpcb-classview-page