PHPackages                             logicbrush/metrics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. logicbrush/metrics

ActiveLibrary[Testing &amp; Quality](/categories/testing)

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(1y ago)118.1k7Apache-2.0PHPPHP ^7.2||^8.0

Since Nov 15Pushed 1y ago3 watchersCompare

[ Source](https://github.com/logicbrush/metrics)[ Packagist](https://packagist.org/packages/logicbrush/metrics)[ Docs](https://github.com/logicbrush/metrics)[ RSS](/packages/logicbrush-metrics/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (13)Used By (7)

Metrics
=======

[](#metrics)

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
------------

[](#installation)

```
composer require --dev logicbrush/metrics
```

Usage
-----

[](#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 {
    ...
 }
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~75 days

Recently: every ~161 days

Total

10

Last Release

598d ago

Major Versions

v0.5.0 → v1.0.02024-09-27

PHP version history (4 changes)v0.1.0PHP &gt;=8.0.0

v0.1.1PHP ^8.0

0.1.2PHP ^7.4|^8.0

v0.3.0PHP ^7.2||^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d777382d5141315194a5acea97dadff8cda390a2f3b5d4c6c2490e9a246605a1?d=identicon)[jflearn](/maintainers/jflearn)

---

Top Contributors

[![jflearn](https://avatars.githubusercontent.com/u/611385?v=4)](https://github.com/jflearn "jflearn (67 commits)")[![nrhamma89](https://avatars.githubusercontent.com/u/116921066?v=4)](https://github.com/nrhamma89 "nrhamma89 (3 commits)")

---

Tags

code-coveragecontinuous-integrationphpannotationsMetricsclover

###  Code Quality

TestsPHPUnit

Static AnalysisRector

### Embed Badge

![Health badge](/badges/logicbrush-metrics/health.svg)

```
[![Health](https://phpackages.com/badges/logicbrush-metrics/health.svg)](https://phpackages.com/packages/logicbrush-metrics)
```

###  Alternatives

[nette/tester

Nette Tester: enjoyable unit testing in PHP with code coverage reporter. 🍏🍏🍎🍏

4917.3M1.5k](/packages/nette-tester)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[leanphp/behat-code-coverage

Generate Code Coverage reports for Behat tests

50359.8k2](/packages/leanphp-behat-code-coverage)[rybakit/phpunit-extras

Custom annotations and expectations for PHPUnit.

4778.2k1](/packages/rybakit-phpunit-extras)[silverleague/ideannotator

Generate PHP DocBlock annotations for DataObject and DataExtension databasefields and relation methods

4768.0k43](/packages/silverleague-ideannotator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
