Skip to content

Commit 493476e

Browse files
staabmsebastianbergmann
authored andcommitted
invoke skipEmptyLines() even earlier
1 parent a9a676f commit 493476e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/CodeCoverage.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ private function applyCoversAndUsesFilter(RawCodeCoverageData $rawData, array|fa
403403
foreach (array_keys($filesWithNoCoverage) as $fileWithNoCoverage) {
404404
$rawData->removeCoverageDataForFile($fileWithNoCoverage);
405405
}
406-
$rawData->skipEmptyLines();
407406

408407
if (is_array($linesToBeCovered)) {
409408
foreach ($linesToBeCovered as $fileToBeCovered => $includedLines) {
@@ -416,6 +415,8 @@ private function applyCoversAndUsesFilter(RawCodeCoverageData $rawData, array|fa
416415
private function applyFilter(RawCodeCoverageData $data): void
417416
{
418417
if ($this->filter->isEmpty()) {
418+
$data->skipEmptyLines();
419+
419420
return;
420421
}
421422

@@ -424,6 +425,7 @@ private function applyFilter(RawCodeCoverageData $data): void
424425
$data->removeCoverageDataForFile($filename);
425426
}
426427
}
428+
$data->skipEmptyLines();
427429
}
428430

429431
private function applyExecutableLinesFilter(RawCodeCoverageData $data): void

0 commit comments

Comments
 (0)