Skip to content

Commit c8a72a8

Browse files
committed
Use variable annotation for cleaner looking code
1 parent 09db9f1 commit c8a72a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/framework/src/Framework/Features/Navigation/NavigationMenuGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ protected function generate(): void
8181
$this->items->push(NavigationItem::create(DocumentationPage::home()));
8282
}
8383
} else {
84-
collect(Config::getArray('hyde.navigation.custom', []))->each(
85-
/** @param array{destination: string, label: ?string, priority: ?int, attributes: array<string, scalar>} $item */ function (array $item): void {
84+
collect(Config::getArray('hyde.navigation.custom', []))->each(function (array $item): void {
85+
/** @var array{destination: string, label: ?string, priority: ?int, attributes: array<string, scalar>} $item */
8686
// Since these were added explicitly by the user, we can assume they should always be shown
8787
$this->items->push(NavigationItem::create($item['destination'], $item['label'] ?? null, $item['priority'] ?? null, $item['attributes'] ?? []));
8888
});

0 commit comments

Comments
 (0)