private function PHP_CodeCoverage_Report_XML::processUnit in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php \PHP_CodeCoverage_Report_XML::processUnit()
1 call to PHP_CodeCoverage_Report_XML::processUnit()
- PHP_CodeCoverage_Report_XML::processFile in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ XML.php
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ XML.php, line 141
Class
- PHP_CodeCoverage_Report_XML
- @since Class available since Release 2.0.0
Code
private function processUnit($unit, PHP_CodeCoverage_Report_XML_File_Report $report) {
if (isset($unit['className'])) {
$unitObject = $report
->getClassObject($unit['className']);
}
else {
$unitObject = $report
->getTraitObject($unit['traitName']);
}
$unitObject
->setLines($unit['startLine'], $unit['executableLines'], $unit['executedLines']);
$unitObject
->setCrap($unit['crap']);
$unitObject
->setPackage($unit['package']['fullPackage'], $unit['package']['package'], $unit['package']['subpackage'], $unit['package']['category']);
$unitObject
->setNamespace($unit['package']['namespace']);
foreach ($unit['methods'] as $method) {
$methodObject = $unitObject
->addMethod($method['methodName']);
$methodObject
->setSignature($method['signature']);
$methodObject
->setLines($method['startLine'], $method['endLine']);
$methodObject
->setCrap($method['crap']);
$methodObject
->setTotals($method['executableLines'], $method['executedLines'], $method['coverage']);
}
}