diff --git a/src/Report/Cobertura.php b/src/Report/Cobertura.php index ead31b46..138a31eb 100644 --- a/src/Report/Cobertura.php +++ b/src/Report/Cobertura.php @@ -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; @@ -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) {