Skip to content

Commit

Permalink
Include feedback from #278
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz committed Dec 10, 2022
1 parent b1ec31c commit 0d488da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/Tree/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function sort()
if ($name[0] == '-') {
if (is_numeric($name[1])) {
$exploded = explode('_', $name);
$buckets['down_numeric'][abs(substr($exploded[0], 1))][$key] = $entry;
$buckets['down_numeric'][abs((int) substr($exploded[0], 1))][$key] = $entry;

continue;
}
Expand All @@ -51,7 +51,7 @@ public function sort()
if ($name[0] == '+') {
if (is_numeric($name[1])) {
$exploded = explode('_', $name);
$buckets['up_numeric'][abs(substr($exploded[0], 1))][$key] = $entry;
$buckets['up_numeric'][abs((int) substr($exploded[0], 1))][$key] = $entry;

continue;
}
Expand All @@ -63,7 +63,7 @@ public function sort()

if (is_numeric($name[0])) {
$exploded = explode('_', $name);
$buckets['numeric'][abs($exploded[0])][$key] = $entry;
$buckets['numeric'][abs((int) $exploded[0])][$key] = $entry;

continue;
}
Expand Down

0 comments on commit 0d488da

Please sign in to comment.