phpdox
phpdox copied to clipboard
Add percentage when showing test coverage
Currently we have on the class view:
Class Name|Description|Coverage
Image|class Image|PASSED
The suggestion would be to have instead:
Class Name|Description|Coverage
Image|class Image|PASSED (25%)
Another related idea is that if you supply the folder (somehow) for the coverage-html output of phpunit, then add a link to it (probably will need some sort of "base-uri" to build it):
<coverage path="${basedir}/build/logs" html="${basedir}/build/coverage" base="http://site.loc/"/>
Then the link could be made for each class to point to the respective html link where it's coverage report can be viewed in html (this being the html report generated by phpunit).
phpDox does have all the information for that in with the coverage-xml so we could even render our own html representation. I considered doing that for a while already but so far didn't have the time.
The main problem with the html coverage-report from phpunit is that it's file based whereas phpDox is unit based (read: class, interface or trait).
Regarding the percentage: Cool idea, i'll try to get that into phpdox asap. If you have time to implement it before me, you're welcome to send a pull request :)