Skip to content

Commit

Permalink
Annotate config array shape
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Oct 29, 2023
1 parent 9c7efa7 commit 6620eb1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ private function searchForPriorityInFrontMatter(): ?int

private function searchForLabelInConfig(): ?string
{
return Config::getArray('hyde.navigation.labels', [
/** @var array<string, string> $config */
$config = Config::getArray('hyde.navigation.labels', [
'index' => 'Home',
DocumentationPage::homeRouteName() => 'Docs',
])[$this->routeKey] ?? null;
]);
return $config[$this->routeKey] ?? null;
}

private function searchForPriorityInConfigs(): ?int
Expand Down

0 comments on commit 6620eb1

Please sign in to comment.