Skip to content

Commit c65a26d

Browse files
committed
refactor: use get_filenames() 4th param
No need to return directories.
1 parent 3719119 commit c65a26d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

system/Autoloader/FileLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public function listNamespaceFiles(string $prefix, string $path): array
343343
continue;
344344
}
345345

346-
$tempFiles = get_filenames($fullPath, true);
346+
$tempFiles = get_filenames($fullPath, true, false, false);
347347

348348
if (! empty($tempFiles)) {
349349
$files = array_merge($files, $tempFiles);

system/Database/MigrationRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public function findNamespaceMigrations(string $namespace): array
424424
if (! empty($this->path)) {
425425
helper('filesystem');
426426
$dir = rtrim($this->path, DIRECTORY_SEPARATOR) . '/';
427-
$files = get_filenames($dir, true);
427+
$files = get_filenames($dir, true, false, false);
428428
} else {
429429
$files = $locator->listNamespaceFiles($namespace, '/Database/Migrations/');
430430
}

0 commit comments

Comments
 (0)