Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 9, 2024 via composer

phpunit/php-code-coverage 10.1.11

Library that provides collection, processing, and rendering functionality for PHP code coverage information.
Package summary
Share
0
issues
1
license
10
BSD-3-Clause
Package created
18 Sep 2012
Version published
21 Dec 2023
Maintainers
1
Total deps
10
Direct deps
9
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
10 Packages, Including:
nikic/php-parser@v5.0.2
phpunit/php-code-coverage@10.1.11
phpunit/php-file-iterator@4.1.0
phpunit/php-text-template@3.0.1
sebastian/code-unit-reverse-lookup@3.0.0
sebastian/complexity@3.2.0
sebastian/environment@6.1.0
sebastian/lines-of-code@2.0.2
sebastian/version@4.0.1
theseer/tokenizer@1.2.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

9
All Dependencies CSV
β“˜ This is a list of phpunit/php-code-coverage 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
nikic/php-parserv5.0.2-BSD-3-Clause
prod
phpunit/php-file-iterator4.1.09.41 kBBSD-3-Clause
prod
phpunit/php-text-template3.0.17.22 kBBSD-3-Clause
prod
sebastian/code-unit-reverse-lookup3.0.06.1 kBBSD-3-Clause
prod
sebastian/complexity3.2.011.49 kBBSD-3-Clause
prod
sebastian/environment6.1.0-BSD-3-Clause
prod
sebastian/lines-of-code2.0.29.53 kBBSD-3-Clause
prod
sebastian/version4.0.15.02 kBBSD-3-Clause
prod
theseer/tokenizer1.2.3-BSD-3-Clause
prod

Visualizations

Frequently Asked Questions

What does phpunit/php-code-coverage do?

phpunit/php-code-coverage is a robust and versatile PHP library, providing the essential functions for collection, processing, and rendering of PHP code coverage information. Code coverage is a key measure used in software testing to describe the degree to which the source code of a program is tested by a particular test suite. The library collects the data and renders the information so it can be used by developers to improve their code and testing.

How do you use phpunit/php-code-coverage?

Utilizing phpunit/php-code-coverage is straightforward for anyone familiar with PHP and composer packages. Installation is completed through Composer by running the following command providing the package as a local per-project dependency:

composer require phpunit/php-code-coverage

For installation as a development-time dependency, which might be required to run a project's test suite, you should add it as follows:

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

Here's a basic usage sample for phpunit/php-code-coverage in your PHP script:

<?php declare(strict_types=1);
use SebastianBergmann\CodeCoverage\Filter;
use SebastianBergmann\CodeCoverage\Driver\Selector;
use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\Report\Html\Facade as HtmlReport;

$filter = new Filter;
$filter->includeFiles(['/path/to/file.php', '/path/to/another_file.php']);

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

$coverage->start('<name of test>');
// Execute your test code here...
$coverage->stop();

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

In the above code snippet, the library is used to start coverage, execute test code within the start/stop block, and then process the coverage data into HTML report format.

Where are the phpunit/php-code-coverage docs?

The comprehensive documentation of phpunit/php-code-coverage can be reached through the repository on GitHub at sebastianbergmann/php-code-coverage. The repository contains thorough explanations and additional usage examples for various functions and interfaces offered by the library.