A package of utilities for making use of coverage metrics in PHP.
composer require logicbrush/metrics
A number of metrics-related functions are accessible via the command line.
Use to annotate source code with metric information from a coverage.xml
file.
Use with your CI process to keep your metrics in front of you as you develop.
php ./vendor/bin/metrics annotate «path to coverage.xml» «path to source file»
This will annotate your code with a @Metrics
annotation, e.g:
/**
* You must have an existing docblock comment on your method for this to work.
* We won't add it for you.
*
* @Metrics( crap = 10.2, uncovered = true )
*/
public function someMethod() : void {
...
}