chore: type checking

This commit is contained in:
Nuno Maduro
2025-06-16 10:14:04 +01:00
parent 8c403a57c2
commit c3bfdf130e
2 changed files with 7 additions and 4 deletions

View File

@ -15,7 +15,7 @@ final class BootOverrides implements Bootstrapper
/** /**
* The list of files to be overridden. * The list of files to be overridden.
* *
* @var array<string, string> * @var array<int, string>
*/ */
public const array FILES = [ public const array FILES = [
'Runner/Filter/NameFilterIterator.php', 'Runner/Filter/NameFilterIterator.php',

View File

@ -88,13 +88,16 @@ final class Coverage
throw ShouldNotHappen::fromMessage(sprintf('Coverage not found in path: %s.', $reportPath)); throw ShouldNotHappen::fromMessage(sprintf('Coverage not found in path: %s.', $reportPath));
} }
/** @var CodeCoverage $codeCoverage */
$handle = fopen($reportPath, 'r'); $handle = fopen($reportPath, 'r');
$code = ''; $code = '';
while (! feof($handle)) { while (is_resource($handle) && ! feof($handle)) {
$code .= fread($handle, 8192); $code .= fread($handle, 8192);
} }
fclose($handle);
if (is_resource($handle)) {
fclose($handle);
}
unlink($reportPath); unlink($reportPath);
$codeCoverage = eval(substr($code, 5)); $codeCoverage = eval(substr($code, 5));