This commit is contained in:
Pierre Rudloff 2020-05-13 21:18:32 +02:00
parent 81e9eaba4e
commit 71d49ad74f
13 changed files with 83 additions and 39 deletions

View file

@ -38,7 +38,7 @@ class LocaleMiddleware
*
* @param array $proposedLocale Locale array created by AcceptLanguage::parse()
*
* @return Locale Locale if chosen, nothing otherwise
* @return Locale|null Locale if chosen, nothing otherwise
*/
public function testLocale(array $proposedLocale)
{
@ -52,6 +52,8 @@ class LocaleMiddleware
return new Locale($proposedLocale['language'] . '_' . $proposedLocale['region']);
}
}
return null;
}
/**