Skip to content

Commit cf4ee54

Browse files
authored
Return error exit code for "No lines…" error.
Fixes exussum12#72
1 parent cdda0be commit cf4ee54

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/functions.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ function handleOutput(array $lines, float $minimumPercentCovered, Output $output
9191

9292

9393
if ($coveredLines + $uncoveredLines == 0) {
94-
error_log('No lines found!');
95-
return;
94+
throw new Exception(
95+
'No lines found!',
96+
3
97+
);
9698
}
9799

98100
$percentCovered = 100 * ($coveredLines / ($coveredLines + $uncoveredLines));

0 commit comments

Comments
 (0)