fewer loose functions
This commit is contained in:
parent
71341be3a8
commit
f00a4e3d90
2 changed files with 3 additions and 13 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -11,12 +11,6 @@ use MicroHTML\HTMLElement;
|
|||
|
||||
use function MicroHTML\INPUT;
|
||||
|
||||
function _new_user(array $row): User
|
||||
{
|
||||
return new User($row);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Class User
|
||||
*
|
||||
|
|
Reference in a new issue