diff --git a/src/Cleaner/Plugins.php b/src/Cleaner/Plugins.php index 2125520..6e575f0 100644 --- a/src/Cleaner/Plugins.php +++ b/src/Cleaner/Plugins.php @@ -58,11 +58,8 @@ class Plugins extends CleanerParent public function values(): array { - $dirs = self::getDirs(DC_PLUGINS_ROOT); - sort($dirs); - $stack = []; - foreach ($dirs as $path => $count) { + foreach (self::getDirs(DC_PLUGINS_ROOT) as $path => $count) { $stack[] = new ValueDescriptor( ns: $path, count: $count diff --git a/src/Cleaner/Themes.php b/src/Cleaner/Themes.php index 53e3f67..10e6106 100644 --- a/src/Cleaner/Themes.php +++ b/src/Cleaner/Themes.php @@ -63,11 +63,8 @@ class Themes extends CleanerParent return []; } - $dirs = self::getDirs($path); - sort($dirs); - $stack = []; - foreach ($dirs as $path => $count) { + foreach ($dirs = self::getDirs($path) as $path => $count) { $stack[] = new ValueDescriptor( ns: $path, count: $count diff --git a/src/Helper/DirTrait.php b/src/Helper/DirTrait.php index 29d6e6e..3fbd255 100644 --- a/src/Helper/DirTrait.php +++ b/src/Helper/DirTrait.php @@ -58,6 +58,7 @@ trait DirTrait $stack[$k] = count(self::scanDir($path . DIRECTORY_SEPARATOR . $k)); } } + ksort($stack); return $stack; }