Need help with php-code-coverage?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

sebastianbergmann
7.6K Stars 314 Forks Other 2.1K Commits 19 Opened issues

Description

Library that provides collection, processing, and rendering functionality for PHP code coverage information.

Services available

!
?

Need anything else?

Contributors list

phpunit/php-code-coverage

Latest Stable Version CI Status Type Coverage

Provides collection, processing, and rendering functionality for PHP code coverage information.

Installation

You can add this library as a local, per-project dependency to your project using Composer:

composer require phpunit/php-code-coverage

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

composer require --dev phpunit/php-code-coverage

Usage

$filter = new Filter;
$filter->includeDirectory('/path/to/directory');

$coverage = new CodeCoverage( (new Selector)->forLineCoverage($filter), $filter );

$coverage->start('');

// ...

$coverage->stop();

(new HtmlReport)->process($coverage, '/tmp/code-coverage-report');

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.