Passed
Push — master ( 40389c...398b9e )
by Jakub
13:03
created
src/Loaders/IniLoader.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
   protected function parseFile(string $filename): array {
19 19
     $result = parse_ini_file($filename, true);
20 20
     if($result === false) {
21
-      throw new \RuntimeException("File $filename does not exist or cannot be read.");
21
+      throw new \RuntimeException("file $filename does not exist or cannot be read.");
22 22
     }
23 23
     return $result;
24 24
   }
Please login to merge, or discard this patch.
src/Loaders/JsonLoader.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
   protected function parseFile(string $filename): array {
22 22
     $content = file_get_contents($filename);
23 23
     if($content === false) {
24
-      throw new \RuntimeException("File $filename does not exist or cannot be read.");
24
+      throw new \RuntimeException("file $filename does not exist or cannot be read.");
25 25
     }
26 26
     return Json::decode($content, Json::FORCE_ARRAY);
27 27
   }
Please login to merge, or discard this patch.
src/Loaders/NeonLoader.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
   protected function parseFile(string $filename): array {
21 21
     $content = file_get_contents($filename);
22 22
     if($content === false) {
23
-      throw new \RuntimeException("File $filename does not exist or cannot be read.");
23
+      throw new \RuntimeException("file $filename does not exist or cannot be read.");
24 24
     }
25 25
     return Neon::decode($content);
26 26
   }
Please login to merge, or discard this patch.
src/Loaders/FileLoader.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
   public function setFolders(array $folders): void {
98 98
     foreach($folders as $folder) {
99 99
       if(!is_dir($folder)) {
100
-        throw new InvalidFolderException("Folder $folder does not exist.");
100
+        throw new InvalidFolderException("folder $folder does not exist.");
101 101
       }
102 102
       $this->folders[] = $folder;
103 103
     }
Please login to merge, or discard this patch.
src/Bridges/NetteDI/TranslationExtension.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
     }
160 160
     foreach($folders as $folder) {
161 161
       if(!is_dir($folder)) {
162
-        throw new InvalidFolderException("Folder $folder does not exist.");
162
+        throw new InvalidFolderException("folder $folder does not exist.");
163 163
       }
164 164
     }
165 165
     return $folders;
Please login to merge, or discard this patch.
src/Resolvers/HeaderLocaleResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@
 block discarded – undo
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])) {
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
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",
Please login to merge, or discard this patch.
tests/Nexendrie/Translation/Bridges/NetteDI/TranslationExtensionTest.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@
 block discarded – undo
279 279
         "debugger" => false
280 280
       ]
281 281
     ];
282
-    Assert::exception(function() use($config){
282
+    Assert::exception(function() use($config) {
283 283
       $this->refreshContainer($config);
284 284
       $panel = $this->getService(TranslationPanel::class);
285 285
       Assert::type(TranslationPanel::class, $panel);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
     $originalLoader = $this->getContainer()
307 307
       ->getService("translation.originalLoader");
308 308
     Assert::type(NeonLoader::class, $originalLoader);
309
-    $compiler =  $this->getService(CatalogueCompiler::class);
309
+    $compiler = $this->getService(CatalogueCompiler::class);
310 310
     Assert::type(CatalogueCompiler::class, $compiler);
311 311
     /** @var Translator $translator */
312 312
     $translator = $this->getService(\Nette\Localization\Translator::class);
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     $originalLoader = $this->getContainer()
353 353
       ->getService("translation.originalLoader");
354 354
     Assert::type(NeonLoader::class, $originalLoader);
355
-    $compiler =  $this->getService(CatalogueCompiler::class);
355
+    $compiler = $this->getService(CatalogueCompiler::class);
356 356
     Assert::type(CatalogueCompiler::class, $compiler);
357 357
     /** @var Translator $translator */
358 358
     $translator = $this->getService(\Nette\Localization\Translator::class);
Please login to merge, or discard this patch.
src/ISettableLocaleResolver.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,8 @@
 block discarded – undo
3 3
 
4 4
 namespace Nexendrie\Translation;
5 5
 
6
-if(false) { // @phpstan-ignore if.alwaysFalse
6
+if(false) {
7
+// @phpstan-ignore if.alwaysFalse
7 8
   /** @deprecated Use SettableLocaleResolver */
8 9
   interface ISettableLocaleResolver extends SettableLocaleResolver {
9 10
   }
Please login to merge, or discard this patch.