Skip to content

Commit e5fb1e6

Browse files
committed
Use strict types in FileUtil::scanFolder()
1 parent cfe087e commit e5fb1e6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

wcfsetup/install/files/lib/util/FileUtil.class.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,8 @@ public static function unifyDirSeparator(string $path): string
223223
/**
224224
* Scans a folder (and subfolder) for a specific file.
225225
* Returns the filename if found, otherwise false.
226-
*
227-
* @param string $folder
228-
* @param string $searchfile
229-
* @param bool $recursive
230-
* @return mixed
231226
*/
232-
public static function scanFolder($folder, $searchfile, $recursive = true)
227+
public static function scanFolder(string $folder, string $searchfile, bool $recursive = true): string|false
233228
{
234229
if (!@\is_dir($folder)) {
235230
return false;
@@ -259,6 +254,8 @@ public static function scanFolder($folder, $searchfile, $recursive = true)
259254
}
260255
}
261256
@\closedir($dirh);
257+
258+
return false;
262259
}
263260

264261
/**

0 commit comments

Comments
 (0)