@@ -253,20 +253,19 @@ private function refreshClasses(): void
253
253
private function createFileIterator (string $ dir ): Nette \Utils \Finder
254
254
{
255
255
if (!is_dir ($ dir )) {
256
- throw new Nette \IOException (sprintf ("File or directory '%s' not found. " , $ dir ));
256
+ throw new Nette \IOException (sprintf ("Directory '%s' not found. " , $ dir ));
257
257
}
258
258
259
259
$ dir = realpath ($ dir ) ?: $ dir ; // realpath does not work in phar
260
260
$ disallow = [];
261
261
foreach (array_merge ($ this ->ignoreDirs , $ this ->excludeDirs ) as $ item ) {
262
262
if ($ item = realpath ($ item )) {
263
- $ disallow [FileSystem:: unixSlashes ( $ item) ] = true ;
263
+ $ disallow [$ item ] = true ;
264
264
}
265
265
}
266
266
267
267
return Nette \Utils \Finder::findFiles ($ this ->acceptFiles )
268
- ->filter ($ filter = fn (SplFileInfo $ file ) => $ file ->getRealPath () === false
269
- || !isset ($ disallow [FileSystem::unixSlashes ($ file ->getRealPath ())]))
268
+ ->filter ($ filter = fn (SplFileInfo $ file ) => $ file ->getRealPath () === false || !isset ($ disallow [$ file ->getRealPath ()]))
270
269
->descentFilter ($ filter )
271
270
->from ($ dir )
272
271
->exclude ($ this ->ignoreDirs );
@@ -286,7 +285,7 @@ private function updateFile(string $file): void
286
285
foreach ($ foundClasses as $ class ) {
287
286
[$ prevFile , $ prevMtime ] = $ this ->classes [$ class ] ?? null ;
288
287
289
- if (isset ($ prevFile ) && @filemtime ($ prevFile ) !== $ prevMtime ) { // @ file may not exists
288
+ if (isset ($ prevFile ) && @filemtime ($ prevFile ) !== $ prevMtime ) { // @ file may not exist
290
289
$ this ->updateFile ($ prevFile );
291
290
[$ prevFile ] = $ this ->classes [$ class ] ?? null ;
292
291
}
0 commit comments