Skip to content

Commit 3719119

Browse files
authored
Merge pull request #6026 from kenjis/refactor-FileLocator
refactor: use get_filenames() 4th param in FileLocator
2 parents ffbf4e6 + 3d2de6d commit 3719119

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

system/Autoloader/FileLocator.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,7 @@ public function listFiles(string $path): array
309309
continue;
310310
}
311311

312-
$tempFiles = get_filenames($fullPath, true);
313-
314-
// Remove directories
315-
$tempFiles = array_filter($tempFiles, static fn ($path) => strtolower(substr($path, -4)) === '.php');
312+
$tempFiles = get_filenames($fullPath, true, false, false);
316313

317314
if (! empty($tempFiles)) {
318315
$files = array_merge($files, $tempFiles);

0 commit comments

Comments
 (0)