public function PHP_CodeCoverage_Report_XML_File::getLineCoverage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php \PHP_CodeCoverage_Report_XML_File::getLineCoverage()
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ XML/ File.php, line 48
Class
- PHP_CodeCoverage_Report_XML_File
- @since Class available since Release 2.0.0
Code
public function getLineCoverage($line) {
$coverage = $this->contextNode
->getElementsByTagNameNS('http://schema.phpunit.de/coverage/1.0', 'coverage')
->item(0);
if (!$coverage) {
$coverage = $this->contextNode
->appendChild($this->dom
->createElementNS('http://schema.phpunit.de/coverage/1.0', 'coverage'));
}
$lineNode = $coverage
->appendChild($this->dom
->createElementNS('http://schema.phpunit.de/coverage/1.0', 'line'));
return new PHP_CodeCoverage_Report_XML_File_Coverage($lineNode, $line);
}