PHPackages                             willpower232/cloverparser - 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. willpower232/cloverparser

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

willpower232/cloverparser
=========================

An extensible class for totalling the unit test coverage from Clover files

v1.1.0(2y ago)016911MITPHPPHP ^7.4 || ^8.0

Since Jun 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/willpower232/cloverparser)[ Packagist](https://packagist.org/packages/willpower232/cloverparser)[ RSS](/packages/willpower232-cloverparser/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (5)Versions (4)Used By (1)

cloverparser
============

[](#cloverparser)

[![run-tests](https://github.com/willpower232/cloverparser/actions/workflows/run-tests.yml/badge.svg)](https://github.com/willpower232/cloverparser/actions/workflows/run-tests.yml)[![Coverage](https://camo.githubusercontent.com/c123411964641425098126512faa2b3f60177c0f026bd21445ad4065ee2e1fb2/68747470733a2f2f6c61726176656c2d636f7665726167652e73332e65752d776573742d322e616d617a6f6e6177732e636f6d2f77696c6c706f7765723233322f636c6f7665727061727365722f6d61696e2e737667)](https://camo.githubusercontent.com/c123411964641425098126512faa2b3f60177c0f026bd21445ad4065ee2e1fb2/68747470733a2f2f6c61726176656c2d636f7665726167652e73332e65752d776573742d322e616d617a6f6e6177732e636f6d2f77696c6c706f7765723233322f636c6f7665727061727365722f6d61696e2e737667)

This is a parser for one or more clover coverage files, as generated by [phpunit/phpunit](https://phpunit.de/), with the aim of producing a percentage for code coverage.

This is intended to be the basis of parsing some clover files for use in other ways such as [willpower232/cloverparser-laravel](https://github.com/willpower232/cloverparser-laravel) which creates an SVG from the coverage percentage and stores it using Laravels framework.

---

A former casual user of [codecov](https://codecov.io) and interested in controlling my own data, I decided to see how complicated it would be to operate a similar setup myself after [their uploader script was compromised](https://www.theregister.com/2021/04/19/codecov_warns_of_stolen_credentials/).

This is the first part of this project, discovering how to get the coverage values out of a clover file.

---

Installation
------------

[](#installation)

```
composer require willpower232/cloverparser

```

Usage
-----

[](#usage)

```
use WillPower232\CloverParser\CloverParser;

$parser = new CloverParser;

$parser->addFile($pathToCloverFile);

$percentage = $parser->getPercentage();
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~494 days

Total

3

Last Release

844d ago

### Community

Maintainers

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

---

Top Contributors

[![willpower232](https://avatars.githubusercontent.com/u/1619102?v=4)](https://github.com/willpower232 "willpower232 (8 commits)")[![ggilder](https://avatars.githubusercontent.com/u/331289?v=4)](https://github.com/ggilder "ggilder (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/willpower232-cloverparser/health.svg)

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

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M361](/packages/dms-phpunit-arraysubset-asserts)[gong023/assert_chain

enable you to use phpunit assert with method chain

1478.9k3](/packages/gong023-assert-chain)

PHPackages © 2026

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