Skip to content

Commit

Permalink
Annotate child array generics
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Feb 29, 2024
1 parent e9cbf99 commit 5970a04
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class NavItem implements Stringable

/**
* Create a new navigation menu item.
*
* @param array<\Hyde\Framework\Features\Navigation\NavItem> $children
*/
public function __construct(Route|string $destination, string $label, int $priority = NavigationMenu::DEFAULT, ?string $group = null, array $children = [])
{
Expand Down Expand Up @@ -208,6 +210,8 @@ public function addChild(NavItem $item): static

/**
* Add multiple navigation items to the children of the navigation item.
*
* @param array<\Hyde\Framework\Features\Navigation\NavItem> $items
*/
public function addChildren(array $items): static
{
Expand Down

0 comments on commit 5970a04

Please sign in to comment.