Skip to content

Commit

Permalink
#1012 Cobertura report pulls functions from report scope, not the ind…
Browse files Browse the repository at this point in the history
…ividual element
  • Loading branch information
dvdoug authored and sebastianbergmann committed Sep 19, 2023
1 parent 0e9761e commit adc0b7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Report/Cobertura.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function process(CodeCoverage $coverage, ?string $target = null): string
}
}

if ($report->numberOfFunctions() === 0) {
if ($item->numberOfFunctions() === 0) {
$packageElement->setAttribute('complexity', (string) $packageComplexity);

continue;
Expand All @@ -218,7 +218,7 @@ public function process(CodeCoverage $coverage, ?string $target = null): string

$classElement->appendChild($classLinesElement);

$functions = $report->functions();
$functions = $item->functions();

foreach ($functions as $functionName => $function) {
if ($function['executableLines'] === 0) {
Expand Down

0 comments on commit adc0b7a

Please sign in to comment.