fix broken array with sort function
This commit is contained in:
parent
908abd74c9
commit
399d675a04
@ -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
|
||||
|
@ -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
|
||||
|
@ -58,6 +58,7 @@ trait DirTrait
|
||||
$stack[$k] = count(self::scanDir($path . DIRECTORY_SEPARATOR . $k));
|
||||
}
|
||||
}
|
||||
ksort($stack);
|
||||
|
||||
return $stack;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user