function Totals::setNumLines
File
-
vendor/
phpunit/ php-code-coverage/ src/ Report/ Xml/ Totals.php, line 71
Class
- Totals
- @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
Namespace
SebastianBergmann\CodeCoverage\Report\XmlCode
public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed) : void {
$this->linesNode
->setAttribute('total', (string) $loc);
$this->linesNode
->setAttribute('comments', (string) $cloc);
$this->linesNode
->setAttribute('code', (string) $ncloc);
$this->linesNode
->setAttribute('executable', (string) $executable);
$this->linesNode
->setAttribute('executed', (string) $executed);
$this->linesNode
->setAttribute('percent', $executable === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($executed, $executable)->asFloat()));
}