Skip to content

Commit b31e7af

Browse files
staabmsebastianbergmann
authored andcommitted
Fix type errors in PhptTestCase
1 parent a3b3843 commit b31e7af

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Runner/PHPT/PhptTestCase.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,9 @@ private function parseExternal(array &$sections): void
561561
);
562562
}
563563

564-
$sections[$section] = file_get_contents($testDirectory . $externalFilename);
564+
$contents = file_get_contents($testDirectory . $externalFilename);
565+
assert($contents !== false && $contents !== '');
566+
$sections[$section] = $contents;
565567
}
566568
}
567569
}
@@ -694,9 +696,9 @@ private function renderForCoverage(string &$job, bool $pathCoverage, ?string $co
694696

695697
file_put_contents($files['job'], $job);
696698

697-
$job = $template->render();
698-
699-
assert($job !== '');
699+
$rendered = $template->render();
700+
assert($rendered !== '');
701+
$job = $rendered;
700702
}
701703

702704
private function cleanupForCoverage(): RawCodeCoverageData

0 commit comments

Comments
 (0)