@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return array Sorted list of "accept" options |
27 | 27 | */ |
28 | -$sortAccept = function ($header) { |
|
28 | +$sortAccept = function($header) { |
|
29 | 29 | $matches = array(); |
30 | 30 | foreach (explode(',', $header) as $option) { |
31 | 31 | $option = array_map('trim', explode(';', $option)); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return string|null a matched option, or NULL if no match |
61 | 61 | */ |
62 | -$matchAccept = function ($header, $supported) use ($sortAccept) { |
|
62 | +$matchAccept = function($header, $supported) use ($sortAccept) { |
|
63 | 63 | $matches = $sortAccept($header); |
64 | 64 | foreach ($matches as $key => $q) { |
65 | 65 | if (isset($supported[$key])) { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * |
92 | 92 | * @return string the negotiated language result or the supplied default |
93 | 93 | */ |
94 | -$negotiateLanguage = function ($supported, $default = 'en-US') use ($matchAccept) { |
|
94 | +$negotiateLanguage = function($supported, $default = 'en-US') use ($matchAccept) { |
|
95 | 95 | $supp = array(); |
96 | 96 | foreach ($supported as $lang => $isSupported) { |
97 | 97 | if ($isSupported) { |