Skip to content

Commit

Permalink
Annotate config generics
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Oct 28, 2023
1 parent 0b4f749 commit ab5bb32
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ public function getItems(): Collection

private function searchForDropdownPriorityInNavigationConfig(string $groupKey): ?int
{
return Config::getArray('hyde.navigation.order', [
/** @var array<string, int> $config */
$config = Config::getArray('hyde.navigation.order', [
'index' => 0,
'posts' => 10,
'docs/index' => 100,
])[$groupKey] ?? null;
]);

return $config[$groupKey] ?? null;
}
}

0 comments on commit ab5bb32

Please sign in to comment.