Skip to content

Commit 2dc34be

Browse files
Remove superfluous null checks
1 parent e31de05 commit 2dc34be

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Report/Clover.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function process(CodeCoverage $coverage, ?string $target = null, ?string
8888
$methodCount = 0;
8989

9090
foreach (range($method['startLine'], $method['endLine']) as $line) {
91-
if (isset($coverageData[$line]) && ($coverageData[$line] !== null)) {
91+
if (isset($coverageData[$line])) {
9292
$methodCount = max($methodCount, count($coverageData[$line]));
9393
}
9494
}

src/Report/Cobertura.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function process(CodeCoverage $coverage, ?string $target = null): string
174174
$methodElement->appendChild($methodLinesElement);
175175

176176
foreach (range($method['startLine'], $method['endLine']) as $line) {
177-
if (!isset($coverageData[$line]) || $coverageData[$line] === null) {
177+
if (!isset($coverageData[$line])) {
178178
continue;
179179
}
180180
$methodLineElement = $document->createElement('line');
@@ -255,7 +255,7 @@ public function process(CodeCoverage $coverage, ?string $target = null): string
255255
$methodElement->appendChild($methodLinesElement);
256256

257257
foreach (range($function['startLine'], $function['endLine']) as $line) {
258-
if (!isset($coverageData[$line]) || $coverageData[$line] === null) {
258+
if (!isset($coverageData[$line])) {
259259
continue;
260260
}
261261
$methodLineElement = $document->createElement('line');

0 commit comments

Comments
 (0)