fewer loose functions

This commit is contained in:
Shish 2023-12-16 11:04:52 +00:00
parent 71341be3a8
commit f00a4e3d90
2 changed files with 3 additions and 13 deletions

View file

@ -511,8 +511,9 @@ class BasePage
}
$sub_links = $sub_links ?? [];
usort($nav_links, "Shimmie2\sort_nav_links");
usort($sub_links, "Shimmie2\sort_nav_links");
usort($nav_links, fn (NavLink $a, NavLink $b) => $a->order - $b->order);
usort($sub_links, fn (NavLink $a, NavLink $b) => $a->order - $b->order);
return [$nav_links, $sub_links];
}
@ -705,8 +706,3 @@ class NavLink
return false;
}
}
function sort_nav_links(NavLink $a, NavLink $b): int
{
return $a->order - $b->order;
}

View file

@ -11,12 +11,6 @@ use MicroHTML\HTMLElement;
use function MicroHTML\INPUT;
function _new_user(array $row): User
{
return new User($row);
}
/**
* Class User
*