There are lots of ways that we can judge other developers’ code. When we do code reviews these are not helpful methods to judge the code and we instead need to use a better method.
Code coverage is calculated as a percentage by taking the number of lines of code executed by our tests and dividing by the total number of lines of code times one hundred.
“` ./vendor/bin/phpunit –help | grep coverage –coverage-clover Generate code coverage report in Clover XML format –coverage-cobertura Generate code coverage report in Cobertura XML format –coverage-crap4j Generate code coverage report in Crap4J XML format –coverage-html Generate code coverage report in HTML format –coverage-php Export PHP_CodeCoverage object to file –coverage-text= Generate code coverage report in text format [default: standard output] –coverage-xmlGenerate code coverage report in PHPUnit XML format