From 13df8141bb8be289cff6f1dfc7fb54285353f876 Mon Sep 17 00:00:00 2001 From: Matt Lorimer Date: Mon, 23 Dec 2019 17:15:02 +0000 Subject: [PATCH] Sort File findDirectories by alphabetical order --- core/base/Helper/File/File.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/base/Helper/File/File.php b/core/base/Helper/File/File.php index 782db865e..e3fa5e77a 100644 --- a/core/base/Helper/File/File.php +++ b/core/base/Helper/File/File.php @@ -15,7 +15,7 @@ class File /** * Get all directories in a path * - * @param $paths array of paths + * @param $paths array|string of paths * @return array All directories in paths */ public function findDirectories($paths): array @@ -37,7 +37,9 @@ class File } } - return $directories; + asort($directories); + + return array_values($directories); } /**