File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 99 */
1010namespace SebastianBergmann \CodeCoverage \StaticAnalysis ;
1111
12- use function assert ;
1312use function crc32 ;
1413use function file_get_contents ;
1514use function file_put_contents ;
1615use function is_file ;
1716use function serialize ;
18- use GlobIterator ;
1917use SebastianBergmann \CodeCoverage \Util \Filesystem ;
20- use SplFileInfo ;
18+ use SebastianBergmann \ FileIterator \ Facade as FileIteratorFacade ;
2119
2220/**
2321 * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
@@ -172,10 +170,8 @@ private function calculateCacheVersion(): void
172170 {
173171 $ buffer = '' ;
174172
175- foreach (new GlobIterator (__DIR__ . '/*.php ' ) as $ file ) {
176- assert ($ file instanceof SplFileInfo);
177-
178- $ buffer .= file_get_contents ($ file ->getPathname ());
173+ foreach ((new FileIteratorFacade ())->getFilesAsArray (__DIR__ , '.php ' ) as $ file ) {
174+ $ buffer .= file_get_contents ($ file );
179175 }
180176
181177 self ::$ cacheVersion = (string ) crc32 ($ buffer );
You can’t perform that action at this time.
0 commit comments