Skip to content

Commit

Permalink
Locale: Add var type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jan 24, 2024
1 parent 6b7ed33 commit c3ed14b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,15 @@ function ($a, $b) {
}
$requestedLocales[] = str_replace('-', '_', $headerValue);
}

/** @var array<string, string> $requestedLocales */
$requestedLocales = array_combine(
array_map('strtolower', array_values($requestedLocales)),
array_values($requestedLocales)
);

$available[] = $this->defaultLocale;
/** @var array<string, string> $availableLocales */
$availableLocales = array_combine(
array_map('strtolower', array_values($available)),
array_values($available)
Expand Down

0 comments on commit c3ed14b

Please sign in to comment.