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.
|
* 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',
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_resource($handle)) {
|
||||||
fclose($handle);
|
fclose($handle);
|
||||||
|
}
|
||||||
|
|
||||||
unlink($reportPath);
|
unlink($reportPath);
|
||||||
|
|
||||||
$codeCoverage = eval(substr($code, 5));
|
$codeCoverage = eval(substr($code, 5));
|
||||||
|
|||||||
Reference in New Issue
Block a user