Skip to content

Commit

Permalink
fewer loose functions
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Dec 16, 2023
1 parent 71341be commit f00a4e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
10 changes: 3 additions & 7 deletions core/basepage.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,9 @@ protected function get_nav_links(): array
}

$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];
}
Expand Down Expand Up @@ -705,8 +706,3 @@ public static function is_active(array $pages_matched, string $url = null): bool
return false;
}
}

function sort_nav_links(NavLink $a, NavLink $b): int
{
return $a->order - $b->order;
}
6 changes: 0 additions & 6 deletions core/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@

use function MicroHTML\INPUT;

function _new_user(array $row): User
{
return new User($row);
}


/**
* Class User
*
Expand Down

0 comments on commit f00a4e3

Please sign in to comment.