@@ -46,9 +46,9 @@ |
||
| 46 | 46 | if($header === null) { |
| 47 | 47 | return null; |
| 48 | 48 | } |
| 49 | - $s = strtolower($header); // case insensitive |
|
| 50 | - $s = strtr($s, '_', '-'); // cs_CZ means cs-CZ |
|
| 51 | - rsort($langs); // first more specific |
|
| 49 | + $s = strtolower($header); // case insensitive |
|
| 50 | + $s = strtr($s, '_', '-'); // cs_CZ means cs-CZ |
|
| 51 | + rsort($langs); // first more specific |
|
| 52 | 52 | $pattern = ')(?:-[^\s,;=]+)?\s*(?:;\s*q=([0-9.]+))?#'; |
| 53 | 53 | preg_match_all('#(' . implode('|', $langs) . $pattern, $s, $matches); |
| 54 | 54 | if(!isset($matches[0])) { |
@@ -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): void { |
|
| 5 | +Testbench\Bootstrap::setup(__DIR__ . '/_temp', function(\Nette\Configurator $configurator): void { |
|
| 6 | 6 | $configurator->addStaticParameters([ |
| 7 | 7 | "appDir" => __DIR__, |
| 8 | 8 | "tempDir" => __DIR__ . "/_temp", |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | $originalLoader = $this->getContainer() |
| 310 | 310 | ->getService("translation.originalLoader"); |
| 311 | 311 | Assert::type(NeonLoader::class, $originalLoader); |
| 312 | - $compiler = $this->getService(CatalogueCompiler::class); |
|
| 312 | + $compiler = $this->getService(CatalogueCompiler::class); |
|
| 313 | 313 | Assert::type(CatalogueCompiler::class, $compiler); |
| 314 | 314 | /** @var Translator $translator */ |
| 315 | 315 | $translator = $this->getService(ITranslator::class); |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | $originalLoader = $this->getContainer() |
| 356 | 356 | ->getService("translation.originalLoader"); |
| 357 | 357 | Assert::type(NeonLoader::class, $originalLoader); |
| 358 | - $compiler = $this->getService(CatalogueCompiler::class); |
|
| 358 | + $compiler = $this->getService(CatalogueCompiler::class); |
|
| 359 | 359 | Assert::type(CatalogueCompiler::class, $compiler); |
| 360 | 360 | /** @var Translator $translator */ |
| 361 | 361 | $translator = $this->getService(ITranslator::class); |