teqnomaze / code-coverage
Check for the code coverage using the clover report of phpunit.
Installs: 1 008
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
pkg:composer/teqnomaze/code-coverage
Requires
- php: >=8.2
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
- squizlabs/php_codesniffer: ^3.13
README
A composer package for checking code coverage score in percentage using the clover.xml report of phpunit.
Installation
This can be installed using Composer.
composer require teqnomaze/code-coverage --dev
Usage
Run the coverage check script which accepts 2 parameters to return coverage result.
- The location of
clover.xmlfile, that's generated by phpunit. - The coverage threshold percentage that's acceptable (Min = 1, Max = 100). Default is 80
vendor/bin/code-coverage ./build/clover.xml 90
Changelog
1.1.0
- Added getters and setters
- Added color styling for the output
1.0.0
- Created initial version.
License
This project is licensed under the MIT License. See LICENSE for more information.