logicbrush / metrics
Examines the clover metrics for the project and will update method Docblocks in the provided source file with `@Metric` annotations.
v1.0.0
2024-09-27 16:31 UTC
Requires
- php: ^7.2||^8.0
- doctrine/annotations: ^1.13
Requires (Dev)
- cmrcx/phptidy: ^3.3
- phpunit/phpunit: ^8.0||^9.5
- rector/rector: ^1.2
This package is auto-updated.
Last update: 2026-02-28 20:21:56 UTC
README
A command line utility for making better use of coverage metrics in PHP. Chiefly, allows you to update your source code with docblock annotations that present method coverage/complexity. Use with your CI process to keep your metrics in front of you as you develop.
Installation
composer require --dev logicbrush/metrics
Usage
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 { ... }