g4 / code-coverage
Installs: 45 406
Dependents: 13
Suggesters: 0
Security: 0
Stars: 1
Watchers: 9
Forks: 3
Open Issues: 0
Type:project
Requires
- php: >=8.2
- ext-simplexml: *
- g4/value-object: *
- questocat/console-color: 1.*
- vanilla/garden-cli: 4.*
Requires (Dev)
- phpunit/phpunit: 10.*
- squizlabs/php_codesniffer: 3.*
README
code-coverage - php command line tool for analysing phpunit xml code coverage report
Install
Via Composer
composer require g4/code-coverage
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 [<options>] 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
Install dependencies
$ composer install
Run tests
$ composer unit-test
License
(The MIT License) see LICENSE file for details...