Skip to content

Commit

Permalink
Rename middle constant to default
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Feb 29, 2024
1 parent aaa17a0 commit 59175a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ private function parseNavigationPriorityConfig(array $config, string $pageKeyNam

return $this->offset(
array_flip($config)[$pageKey] ?? null,
NavigationMenu::MIDDLE
NavigationMenu::DEFAULT
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class NavItem implements Stringable
/**
* Create a new navigation menu item.
*/
public function __construct(Route|string $destination, string $label, int $priority = NavigationMenu::MIDDLE, ?string $group = null, array $children = [])
public function __construct(Route|string $destination, string $label, int $priority = NavigationMenu::DEFAULT, ?string $group = null, array $children = [])
{
if (is_string($destination)) {
$destination = Routes::get($destination) ?? new ExternalRoute($destination);
Expand Down Expand Up @@ -72,7 +72,7 @@ public static function fromRoute(Route $route, ?string $label = null, ?int $prio
/**
* Create a new navigation menu item leading to an external URI.
*/
public static function forLink(string $href, string $label, int $priority = NavigationMenu::MIDDLE): static
public static function forLink(string $href, string $label, int $priority = NavigationMenu::DEFAULT): static
{
return new static($href, $label, $priority);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
abstract class NavigationMenu
{
public const MIDDLE = 500;
public const DEFAULT = 500;
public const LAST = 999;

/** @var \Illuminate\Support\Collection<\Hyde\Framework\Features\Navigation\NavItem> */
Expand Down

0 comments on commit 59175a3

Please sign in to comment.