Skip to content

Commit c13a5d5

Browse files
authored
Cobertura Package Name Fallback
1 parent 93784f8 commit c13a5d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Report/Cobertura.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function process(CodeCoverage $coverage, ?string $target = null, ?string
8484

8585
$packageElement = $document->createElement('package');
8686
$packageComplexity = 0;
87-
$packageName = $name ?? '';
87+
$packageName = $name ?? str_replace($report->pathAsString() . DIRECTORY_SEPARATOR, '', $item->pathAsString());
8888

8989
$packageElement->setAttribute('name', $packageName);
9090

0 commit comments

Comments
 (0)