Skip to content

Commit

Permalink
Unwrap default value
Browse files Browse the repository at this point in the history
Will make the next refactor more readable
  • Loading branch information
caendesilva committed Nov 7, 2023
1 parent 3df5669 commit 1a4b498
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ private function searchForPriorityInNavigationConfig(): ?int
'docs/index' => 100,
]);

return $this->parseNavigationPriorityConfig($config);
return $this->parseNavigationPriorityConfig($config, 'routeKey');
}

/** @param array<string, int>|array<string> $config */
private function parseNavigationPriorityConfig(array $config, string $pageKeyName = 'routeKey'): ?int
private function parseNavigationPriorityConfig(array $config, string $pageKeyName): ?int
{
$pageKey = $this->{$pageKeyName};

Expand Down

0 comments on commit 1a4b498

Please sign in to comment.