logicbrush / metrics
Examines the clover metrics for the project and will update method Docblocks in the provided source file with `@Metric` annotations.
Installs: 6 845
Dependents: 5
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^7.2||^8.0
- doctrine/annotations: ^1.13
Requires (Dev)
- cmrcx/phptidy: ^3.3
- phpunit/phpunit: ^8.0||^9.5
This package is auto-updated.
Last update: 2024-04-08 19:51:45 UTC
README
A package of utilities for making use of coverage metrics in PHP.
Installation
composer require logicbrush/metrics
Command Line Functions
A number of metrics-related functions are accessible via the command line.
Annotate
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 { ... }