Skip to content

Commit 8f2a38c

Browse files
$linesValid is always !== 0 at this point
1 parent 494f2db commit 8f2a38c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Report/Cobertura.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function process(CodeCoverage $coverage, ?string $target = null): string
153153

154154
$linesValid = $method['executableLines'];
155155
$linesCovered = $method['executedLines'];
156-
$lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid);
156+
$lineRate = $linesCovered / $linesValid;
157157

158158
$branchesValid = $method['executableBranches'];
159159
$branchesCovered = $method['executedBranches'];
@@ -228,7 +228,7 @@ public function process(CodeCoverage $coverage, ?string $target = null): string
228228

229229
$linesValid = $function['executableLines'];
230230
$linesCovered = $function['executedLines'];
231-
$lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid);
231+
$lineRate = $linesCovered / $linesValid;
232232

233233
$functionsLinesValid += $linesValid;
234234
$functionsLinesCovered += $linesCovered;

0 commit comments

Comments
 (0)