mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 11:27:03 +00:00
Upgraded PHP-CS-Fixer / applied optimized rules
This commit is contained in:
@@ -35,9 +35,10 @@ class LocaleMiddleware extends BaseMiddleware
|
||||
// Src: https://gist.github.com/spolischook/0cde9c6286415cddc088
|
||||
$prefLocales = array_reduce(
|
||||
explode(',', $langs),
|
||||
function ($res, $el) {
|
||||
function ($res, $el)
|
||||
{
|
||||
list($l, $q) = array_merge(explode(';q=', $el), [1]);
|
||||
$res[$l] = (float) $q;
|
||||
$res[$l] = (float)$q;
|
||||
return $res;
|
||||
},
|
||||
[]
|
||||
|
Reference in New Issue
Block a user