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
|
public function values(): array
|
||||||
{
|
{
|
||||||
$dirs = self::getDirs(DC_PLUGINS_ROOT);
|
|
||||||
sort($dirs);
|
|
||||||
|
|
||||||
$stack = [];
|
$stack = [];
|
||||||
foreach ($dirs as $path => $count) {
|
foreach (self::getDirs(DC_PLUGINS_ROOT) as $path => $count) {
|
||||||
$stack[] = new ValueDescriptor(
|
$stack[] = new ValueDescriptor(
|
||||||
ns: $path,
|
ns: $path,
|
||||||
count: $count
|
count: $count
|
||||||
|
@ -63,11 +63,8 @@ class Themes extends CleanerParent
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$dirs = self::getDirs($path);
|
|
||||||
sort($dirs);
|
|
||||||
|
|
||||||
$stack = [];
|
$stack = [];
|
||||||
foreach ($dirs as $path => $count) {
|
foreach ($dirs = self::getDirs($path) as $path => $count) {
|
||||||
$stack[] = new ValueDescriptor(
|
$stack[] = new ValueDescriptor(
|
||||||
ns: $path,
|
ns: $path,
|
||||||
count: $count
|
count: $count
|
||||||
|
@ -58,6 +58,7 @@ trait DirTrait
|
|||||||
$stack[$k] = count(self::scanDir($path . DIRECTORY_SEPARATOR . $k));
|
$stack[$k] = count(self::scanDir($path . DIRECTORY_SEPARATOR . $k));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ksort($stack);
|
||||||
|
|
||||||
return $stack;
|
return $stack;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user