@@ -2,7 +2,7 @@ |
||
| 2 | 2 | declare(strict_types=1); |
| 3 | 3 | |
| 4 | 4 | require __DIR__ . "/../vendor/autoload.php"; |
| 5 | -Testbench\Bootstrap::setup(__DIR__ . '/_temp', function (\Nette\Configurator $configurator) { |
|
| 5 | +Testbench\Bootstrap::setup(__DIR__ . '/_temp', function(\Nette\Configurator $configurator) { |
|
| 6 | 6 | $configurator->addParameters([ |
| 7 | 7 | "appDir" => __DIR__, |
| 8 | 8 | "tempDir" => __DIR__ . "/_temp", |
@@ -48,9 +48,9 @@ |
||
| 48 | 48 | if($header === null) { |
| 49 | 49 | return null; |
| 50 | 50 | } |
| 51 | - $s = strtolower($header); // case insensitive |
|
| 52 | - $s = strtr($s, '_', '-'); // cs_CZ means cs-CZ |
|
| 53 | - rsort($langs); // first more specific |
|
| 51 | + $s = strtolower($header); // case insensitive |
|
| 52 | + $s = strtr($s, '_', '-'); // cs_CZ means cs-CZ |
|
| 53 | + rsort($langs); // first more specific |
|
| 54 | 54 | $pattern = ')(?:-[^\s,;=]+)?\s*(?:;\s*q=([0-9.]+))?#'; |
| 55 | 55 | preg_match_all('#(' . implode('|', $langs) . $pattern, $s, $matches); |
| 56 | 56 | if(!$matches[0]) { |