PHPackages                             g4/code-coverage - 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. g4/code-coverage

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

g4/code-coverage
================

2.0.2(2y ago)154.5k↓33.3%314MITPHPPHP &gt;=8.2

Since Oct 24Pushed 2y ago7 watchersCompare

[ Source](https://github.com/g4code/code-coverage)[ Packagist](https://packagist.org/packages/g4/code-coverage)[ RSS](/packages/g4-code-coverage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (14)Used By (14)

code-coverage
=============

[](#code-coverage)

> code-coverage - [php](http://php.net) command line tool for analysing [phpunit](https://phpunit.de) xml code coverage report

Install
-------

[](#install)

Via Composer

```
composer require g4/code-coverage
```

Usage
-----

[](#usage)

Before running code-coverage, run phpunit with --coverage-clover option to generate code-coverage xml file

```
./vendor/bin/phpunit --coverage-clover=path/to/code-coverage.xml
```

```
usage: code-coverage []

Analyze phpunit coverage report.

OPTIONS
  --file, -f         Path to phpunit's code coverage xml report
  --help, -?         Display this help.
  --percentage, -p   Minimum coverage percentage to be considered "highly"
                     covered.

e.g.
./vendor/bin/code-coverage -p 90 -f path/to/code-coverage.xml

output:
 Required:     90.00%
   Methods:    91.43%
   Statements: 95.58%
   Elements:   94.59%
```

Development
-----------

[](#development)

### Install dependencies

[](#install-dependencies)

```
$ composer install

```

### Run tests

[](#run-tests)

```
$ composer unit-test

```

License
-------

[](#license)

(The MIT License) see LICENSE file for details...

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 78.1% 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 ~192 days

Recently: every ~525 days

Total

13

Last Release

817d ago

Major Versions

1.4.2 → 2.0.02023-11-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/12ceafbc629c3019d7cd78dfec322d694f44e0df8741bc6044f4acbf99964ff8?d=identicon)[g4code](/maintainers/g4code)

---

Top Contributors

[![gomboc](https://avatars.githubusercontent.com/u/1145653?v=4)](https://github.com/gomboc "gomboc (25 commits)")[![ppavlovic](https://avatars.githubusercontent.com/u/2664974?v=4)](https://github.com/ppavlovic "ppavlovic (7 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/g4-code-coverage/health.svg)

```
[![Health](https://phpackages.com/badges/g4-code-coverage/health.svg)](https://phpackages.com/packages/g4-code-coverage)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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