function File::lineCoverage
File
-
vendor/
phpunit/ php-code-coverage/ src/ Report/ Xml/ File.php, line 45
Class
- File
- @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
Namespace
SebastianBergmann\CodeCoverage\Report\XmlCode
public function lineCoverage(string $line) : Coverage {
$coverage = $this->contextNode
->getElementsByTagNameNS('https://schema.phpunit.de/coverage/1.0', 'coverage')
->item(0);
if (!$coverage) {
$coverage = $this->contextNode
->appendChild($this->dom
->createElementNS('https://schema.phpunit.de/coverage/1.0', 'coverage'));
}
$lineNode = $coverage->appendChild($this->dom
->createElementNS('https://schema.phpunit.de/coverage/1.0', 'line'));
return new Coverage($lineNode, $line);
}