PHPackages                             cloak/coverallskit - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. cloak/coverallskit

AbandonedArchivedLibrary[PDF &amp; Document Generation](/categories/documents)

cloak/coverallskit
==================

PHP client for coveralls.io

2.3.3(10y ago)24.5k1[1 issues](https://github.com/cloak-php/coveralls-kit/issues)[1 PRs](https://github.com/cloak-php/coveralls-kit/pulls)4MITPHPPHP &gt;=5.5.0

Since Mar 23Pushed 5y agoCompare

[ Source](https://github.com/cloak-php/coveralls-kit)[ Packagist](https://packagist.org/packages/cloak/coverallskit)[ RSS](/packages/cloak-coverallskit/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (17)Versions (39)Used By (4)

CoverallsKit
============

[](#coverallskit)

[![Build Status](https://camo.githubusercontent.com/bf1b16b01cd9338caca93ea309ddf50fa0f75ff774162c8d86780fcc3cd709a7/68747470733a2f2f7472617669732d63692e6f72672f636c6f616b2d7068702f636f766572616c6c732d6b69742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cloak-php/coveralls-kit)[![Circle CI](https://camo.githubusercontent.com/b2666e6358fa0c81066ce693e18c71b9d511d0384f3ae994da123d2fd3e9e513/68747470733a2f2f636972636c6563692e636f6d2f67682f636c6f616b2d7068702f636f766572616c6c732d6b69742e7376673f7374796c653d737667)](https://circleci.com/gh/cloak-php/coveralls-kit)[![Build Status](https://camo.githubusercontent.com/a0fb783f8e2ab71aca81e16af8efa0d2263042c12f43f687b730db9bf9bc77a8/68747470733a2f2f636f6465736869702e636f6d2f70726f6a656374732f61663934393761302d373061622d303133322d346236312d3232376132366665376564372f7374617475733f6272616e63683d6d6173746572)](https://codeship.com/projects/54536)

[![Stories in Ready](https://camo.githubusercontent.com/224ff1dfcecd052ebea3ab0f781949406652346d5d5a5e4953336606ebab369e/68747470733a2f2f62616467652e776166666c652e696f2f636c6f616b2d7068702f636f766572616c6c732d6b69742e706e673f6c6162656c3d7265616479267469746c653d5265616479)](https://waffle.io/cloak-php/coveralls-kit)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b12eeafcdf74cfca9dc16ef23c85168d255034d818c70953cb9fd70b9d44b881/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636c6f616b2d7068702f636f766572616c6c732d6b69742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/cloak-php/coveralls-kit/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/678f63c739f960eaee941cf64d15d84026b4b70caf683071eb0e9fec1a010d51/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f636c6f616b2d7068702f636f766572616c6c732d6b69742f62616467652e706e67)](https://coveralls.io/r/cloak-php/coveralls-kit)[![Dependency Status](https://camo.githubusercontent.com/7844dab8eb24a90514748344abed168bcd0371dea9260cd808398b19a667c56b/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3533666435393439663464663135343936353030303030322f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/53fd5949f4df154965000002)

[![Latest Stable Version](https://camo.githubusercontent.com/e4c4d2b1ba38ee3994b467445eb8a761cb60613d6e8c099fa06d43f23ae9ce77/68747470733a2f2f706f7365722e707567782e6f72672f636c6f616b2f636f766572616c6c736b69742f762f737461626c652e737667)](https://packagist.org/packages/cloak/coverallskit) [![License](https://camo.githubusercontent.com/436e9b4a11857473590615ca4dcced0d49f090deaaadf6d30bd20d5fef2b7d69/68747470733a2f2f706f7365722e707567782e6f72672f636c6f616b2f636f766572616c6c736b69742f6c6963656e73652e737667)](https://packagist.org/packages/cloak/coverallskit)

**CoverallsKit** is the library for transmitting the report of code coverage to **coveralls**.
This library works with **PHP5.5** or more.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.5
- Xdebug &gt;= 2.2.2

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

[](#installation)

Installation that uses the composer.

1. Install the [composer](https://getcomposer.org/).
2. Install the package.

    ```
     composer require cloak/coverallskit --dev

    ```

Basic usage
-----------

[](#basic-usage)

You can generate a json file using the **coverallskit/CoverallsReportBuilder**.
You just set the code coverage of rows that have been executed.
Code coverage can be obtained easily by using the **HHVM** and **xdebug**.

```
$travis = new TravisCI( new Environment($_SERVER) );
$service = new CIService($travis);

$builder = new CoverallsReportBuilder();
$builder->token('your repository token')
	->service($service)
	->repository(new GitRepository(__DIR__ . '/../'));

$source = new SourceFile('path/to/file');
$source->addCoverage(CoverageResult::executed(1));	//The first line was executed
$source->addCoverage(CoverageResult::unused(2));	//The second line is not executed
$source->addCoverage(CoverageResult::executed(3));	//The third line is executed

$builder->addSource($source);
$builder->build()->saveAs(__DIR__ . '/tmp/coverage.json');
```

Using a configuration file
--------------------------

[](#using-a-configuration-file)

If you use a configuration file, you can send the report more easily.

```
use coverallskit\BuilderConfiguration;
use coverallskit\CoverallsReportBuilder;

$configuration = BuilderConfiguration::loadFromFile('coveralls.toml');
$builder = CoverallsReportBuilder::fromConfiguration($configuration);
$builder->build()->save()->upload();
```

Configuration file format
-------------------------

[](#configuration-file-format)

It is also possible to use a configuration file.
The file format is **toml format**.

```
token = "{api-token}"
service = "travis-ci"
repositoryDirectory = "."

[reportFile]
output = "script/coveralls.json"

[reportFile.input]
type = "lcov"
file = "script/report.lcov"
```

### File format

[](#file-format)

NameRequiredDefaultDescriptiontokenoptional**COVERALLS\_REPO\_TOKEN**[coveralls.io](https://coveralls.io/docs/api) api token. If you do not specify, use the environment variable **COVERALLS\_REPO\_TOKEN**.serviceoptional**travis-ci**CI(Continuous Integration) service name. You can use the **travis-ci** or **travis-pro** or **circle-ci** or **drone.io** or **codeship**reportFileoptionalPlease look at the **reportFile section**.repositoryDirectoryoptional.Directory path of the **git repository**. Will specify a relative path from the directory containing the configuration file.#### reportFile

[](#reportfile)

##### imput

[](#imput)

NameRequiredDefaultDescriptiontypeoptionalWill specify the file type in the code coverage report. You can specify the **lcov** or **clover**.fileoptionalcoveralls.jsonWill specify a file of code coverage report.##### output

[](#output)

will specify the json file name to be sent to the [coveralls.io](https://coveralls.io/docs/api).
Will specify a relative path from the directory containing the configuration file.

Task for Robo
-------------

[](#task-for-robo)

Support the [robo](https://github.com/Codegyre/Robo) of tasks, so you can easily send a report.
Please look at the [robo-coveralls-kit](https://github.com/cloak-php/robo-coveralls-kit) for more information.

Detailed documentation
----------------------

[](#detailed-documentation)

- [Work with Travis-CI](docs/travis-ci.md)

Run only unit test
------------------

[](#run-only-unit-test)

```
composer test

```

How to run the example
----------------------

[](#how-to-run-the-example)

```
vendor/bin/robo example:basic

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 99.9% 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 ~20 days

Recently: every ~33 days

Total

38

Last Release

3675d ago

Major Versions

1.4.2 → 2.0.02015-04-28

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/70c299d6d6015ee714954aa05e4d0e9c7b1d31318a5d7db5e9bb4e1f70f78afc?d=identicon)[holyshared](/maintainers/holyshared)

---

Top Contributors

[![holyshared](https://avatars.githubusercontent.com/u/167190?v=4)](https://github.com/holyshared "holyshared (749 commits)")[![waffle-iron](https://avatars.githubusercontent.com/u/6912981?v=4)](https://github.com/waffle-iron "waffle-iron (1 commits)")

---

Tags

reportclovercode coveragecoverallslcov

### Embed Badge

![Health badge](/badges/cloak-coverallskit/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[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)[drutiny/drutiny

This is a generic Drupal 7 and Drupal 8 site auditing and optional remediation tool.

132122.2k17](/packages/drutiny-drutiny)[aspose-cloud/aspose-words-cloud

Open, generate, edit, split, merge, compare and convert Word documents. Integrate Cloud API into your solutions to manipulate documents. Convert PDF to Word (DOC, DOCX, ODT, RTF and HTML) and in the opposite direction.

32157.4k](/packages/aspose-cloud-aspose-words-cloud)

PHPackages © 2026

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