Passed
Push — master ( bb74df...01777c )
by Jakub
02:24
created
src/Translator.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     $variants = explode("|", $message);
79 79
     foreach($variants as $variant) {
80 80
       $interval = Intervals::findInterval($variant);
81
-      if(is_string($interval) AND Intervals::isInInterval($count, $interval)) {
81
+      if(is_string($interval) and Intervals::isInInterval($count, $interval)) {
82 82
         return Strings::trim(Strings::after($variant, $interval));
83 83
       }
84 84
     }
Please login to merge, or discard this patch.
src/Bridges/NetteDI/TranslationExtension.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
       $resolver = Arrays::get($this->resolvers, strtolower($resolverName), "");
112 112
       if($resolver !== "") {
113 113
         $return[] = $resolver;
114
-      } elseif(class_exists($resolverName) AND is_subclass_of($resolverName, ILocaleResolver::class)) {
114
+      } elseif(class_exists($resolverName) and is_subclass_of($resolverName, ILocaleResolver::class)) {
115 115
         $return[] = $resolverName;
116 116
       } else {
117 117
         throw new InvalidLocaleResolverException("Invalid locale resolver $resolverName.");
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     $loader = Arrays::get($this->loaders, strtolower($loaderName), "");
133 133
     if($loader !== "") {
134 134
       return $loader;
135
-    } elseif(class_exists($loaderName) AND is_subclass_of($loaderName, ILoader::class)) {
135
+    } elseif(class_exists($loaderName) and is_subclass_of($loaderName, ILoader::class)) {
136 136
       return $loaderName;
137 137
     }
138 138
     throw new InvalidLoaderException("Invalid translation loader.");
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     }
153 153
     foreach($folders as $folder) {
154 154
       if(!is_dir($folder)) {
155
-        throw new InvalidFolderException("Folder $folder does not exist.");
155
+        throw new InvalidFolderException("folder $folder does not exist.");
156 156
       }
157 157
     }
158 158
     return $folders;
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $chainResolver->addSetup("addResolver", [$resolverService]);
191 191
       }
192 192
     }
193
-    if($config["debugger"] AND interface_exists(\Tracy\IBarPanel::class)) {
193
+    if($config["debugger"] and interface_exists(\Tracy\IBarPanel::class)) {
194 194
       $builder->addDefinition($this->prefix(static::SERVICE_PANEL))
195 195
         ->setClass(TranslationPanel::class);
196 196
       $builder->getDefinition("tracy.bar")
Please login to merge, or discard this patch.
src/Bridges/NetteApplication/ParamLocaleResolver.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
   
31 31
   public function onRequest(Application $application, Request $request): void {
32 32
     $locale = $request->getParameter($this->param);
33
-    if($request->method === Request::FORWARD AND is_null($locale)) {
33
+    if($request->method === Request::FORWARD and is_null($locale)) {
34 34
       return;
35 35
     }
36 36
     $this->request = $request;
Please login to merge, or discard this patch.
src/Loaders/FileLoader.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
   public function setFolders(array $folders) {
82 82
     foreach($folders as $folder) {
83 83
       if(!is_dir($folder)) {
84
-        throw new InvalidFolderException("Folder $folder does not exist.");
84
+        throw new InvalidFolderException("folder $folder does not exist.");
85 85
       }
86 86
       $this->folders[] = $folder;
87 87
     }
88 88
   }
89 89
   
90 90
   protected function addResource(string $filename, string $domain): void {
91
-    if(!isset($this->resources[$domain]) OR !in_array($filename, $this->resources[$domain])) {
91
+    if(!isset($this->resources[$domain]) or !in_array($filename, $this->resources[$domain])) {
92 92
       $this->resources[$domain][] = $filename;
93 93
     }
94 94
   }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
       $lang = [];
120 120
       $filename = "$name.$this->lang.$extension";
121 121
       $filename = str_replace($defaultFilename, $filename, $file->getPathname());
122
-      if($this->lang != $defaultLang AND is_file($filename)) {
122
+      if($this->lang != $defaultLang and is_file($filename)) {
123 123
         $lang = $this->parseFile($filename);
124 124
         $this->addResource($filename, $name);
125 125
       }
Please login to merge, or discard this patch.