mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
chore: type checking
This commit is contained in:
@ -15,7 +15,7 @@ final class BootOverrides implements Bootstrapper
|
||||
/**
|
||||
* The list of files to be overridden.
|
||||
*
|
||||
* @var array<string, string>
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public const array FILES = [
|
||||
'Runner/Filter/NameFilterIterator.php',
|
||||
|
||||
@ -88,13 +88,16 @@ final class Coverage
|
||||
throw ShouldNotHappen::fromMessage(sprintf('Coverage not found in path: %s.', $reportPath));
|
||||
}
|
||||
|
||||
/** @var CodeCoverage $codeCoverage */
|
||||
$handle = fopen($reportPath, 'r');
|
||||
$code = '';
|
||||
while (! feof($handle)) {
|
||||
while (is_resource($handle) && ! feof($handle)) {
|
||||
$code .= fread($handle, 8192);
|
||||
}
|
||||
fclose($handle);
|
||||
|
||||
if (is_resource($handle)) {
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
unlink($reportPath);
|
||||
|
||||
$codeCoverage = eval(substr($code, 5));
|
||||
|
||||
Reference in New Issue
Block a user