@@ -253,20 +253,19 @@ private function refreshClasses(): void
253253 private function createFileIterator (string $ dir ): Nette \Utils \Finder
254254 {
255255 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 ));
257257 }
258258
259259 $ dir = realpath ($ dir ) ?: $ dir ; // realpath does not work in phar
260260 $ disallow = [];
261261 foreach (array_merge ($ this ->ignoreDirs , $ this ->excludeDirs ) as $ item ) {
262262 if ($ item = realpath ($ item )) {
263- $ disallow [FileSystem:: unixSlashes ( $ item) ] = true ;
263+ $ disallow [$ item ] = true ;
264264 }
265265 }
266266
267267 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 ()]))
270269 ->descentFilter ($ filter )
271270 ->from ($ dir )
272271 ->exclude ($ this ->ignoreDirs );
@@ -286,7 +285,7 @@ private function updateFile(string $file): void
286285 foreach ($ foundClasses as $ class ) {
287286 [$ prevFile , $ prevMtime ] = $ this ->classes [$ class ] ?? null ;
288287
289- if (isset ($ prevFile ) && @filemtime ($ prevFile ) !== $ prevMtime ) { // @ file may not exists
288+ if (isset ($ prevFile ) && @filemtime ($ prevFile ) !== $ prevMtime ) { // @ file may not exist
290289 $ this ->updateFile ($ prevFile );
291290 [$ prevFile ] = $ this ->classes [$ class ] ?? null ;
292291 }
0 commit comments