Skip to content

Commit ec30451

Browse files
sebastianbergmanntheseerlocalheinz
committed
Return early
Co-authored-by: Sebastian Bergmann <[email protected]> Co-authored-by: Arne Blankerts <[email protected]> Co-authored-by: Andreas Möller <[email protected]>
1 parent 489650a commit ec30451

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/CodeCoverage.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -203,25 +203,27 @@ public function append(RawCodeCoverageData $rawData, string $id = null, bool $ap
203203
return;
204204
}
205205

206-
if ($id !== self::UNCOVERED_FILES) {
207-
$this->applyCoversAndUsesFilter(
208-
$rawData,
209-
$linesToBeCovered,
210-
$linesToBeUsed,
211-
$size
212-
);
213-
214-
if (empty($rawData->lineCoverage())) {
215-
return;
216-
}
206+
if ($id === self::UNCOVERED_FILES) {
207+
return;
208+
}
217209

218-
$this->tests[$id] = [
219-
'size' => $size->asString(),
220-
'status' => $status->asString(),
221-
];
210+
$this->applyCoversAndUsesFilter(
211+
$rawData,
212+
$linesToBeCovered,
213+
$linesToBeUsed,
214+
$size
215+
);
222216

223-
$this->data->markCodeAsExecutedByTestCase($id, $rawData);
217+
if (empty($rawData->lineCoverage())) {
218+
return;
224219
}
220+
221+
$this->tests[$id] = [
222+
'size' => $size->asString(),
223+
'status' => $status->asString(),
224+
];
225+
226+
$this->data->markCodeAsExecutedByTestCase($id, $rawData);
225227
}
226228

227229
/**

0 commit comments

Comments
 (0)