Skip to content

Commit f659bd2

Browse files
$linesToBeCovered is always an array at this point
1 parent 5c50706 commit f659bd2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/CodeCoverage.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use function array_unique;
1818
use function count;
1919
use function explode;
20-
use function is_array;
2120
use function is_file;
2221
use function sort;
2322
use ReflectionClass;
@@ -401,11 +400,9 @@ private function applyCoversAndUsesFilter(RawCodeCoverageData $rawData, array|fa
401400
$rawData->removeCoverageDataForFile($fileWithNoCoverage);
402401
}
403402

404-
if (is_array($linesToBeCovered)) {
405-
foreach ($linesToBeCovered as $fileToBeCovered => $includedLines) {
406-
$rawData->keepLineCoverageDataOnlyForLines($fileToBeCovered, $includedLines);
407-
$rawData->keepFunctionCoverageDataOnlyForLines($fileToBeCovered, $includedLines);
408-
}
403+
foreach ($linesToBeCovered as $fileToBeCovered => $includedLines) {
404+
$rawData->keepLineCoverageDataOnlyForLines($fileToBeCovered, $includedLines);
405+
$rawData->keepFunctionCoverageDataOnlyForLines($fileToBeCovered, $includedLines);
409406
}
410407
}
411408

0 commit comments

Comments
 (0)