In PHP, the coverage stats are easily provided by PHPUnit. But adding a badge to your repo is another matter.
I found this solution to have network outages (e.g. 6/19/2020 10:25pm) and ended up with saying the branch was in a dettached head, which wasn't the case. This made the badge useless as each time the URL needed to be manually updated. The badges look nice, they don't have an icon and say simply coverage.
.coveralls.yml
src_dir: .
service_name: travis-pro
# for php-coveralls
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json
This solution is pretty sketchy as it has you add a bash shell script that is obtained from a get request to work. Talk about security vunerability. Because it's just running on a Travis container I was okay with using this in an open source project. The badge doesn't look good. It has a logo and rather than stating "Coverage" it stats "Codecov 94%" which is unclear to people who do not know about the product.
Add this line to travis YAML
- bash <(curl -s https://codecov.io/bash)
Overall I'm pretty dissatisfied. I'll probably end up taking the PHPUnit output and generating a GD file.