Passed
Pull Request — master (#20)
by
unknown
02:47
created
src/Translator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
         // translate($message, int $count, array $params, string $lang = null)
92 92
         // translate($message, array $params, string $lang = null)
93 93
 
94
-        $message = (string)$message;
94
+        $message = (string) $message;
95 95
         list($count, $params, $lang) = array_values($this->parseParameters($parameters));
96 96
 
97 97
         // If wrong input arguments passed, return message key
98 98
         if (!is_int($count) || !is_array($params) || !is_string($lang)) {
99
-            Arrays::invoke($this->onTranslate, $this, $message, $message, $lang, (int)strval($count), (array)$params);
99
+            Arrays::invoke($this->onTranslate, $this, $message, $message, $lang, (int) strval($count), (array) $params);
100 100
             return $message; // @ maybe throw exception?
101 101
         }
102 102
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             $match = str_replace(['{', '}', ' '], '', trim($match));
171 171
             $foundCountArray = explode(',', $match);
172 172
             foreach ($foundCountArray as $foundCount) {
173
-                if ($count === (int)$foundCount) {
173
+                if ($count === (int) $foundCount) {
174 174
                     return $translationForm;
175 175
                 }
176 176
             }
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
             $rangeArray = explode(',', $range);
186 186
             $fromRaw = str_replace(' ', '', $rangeArray[0]);
187 187
             $toRaw = str_replace(' ', '', $rangeArray[1]);
188
-            $from = $fromRaw === '-Inf' ? PHP_INT_MIN : (int)$fromRaw;
189
-            $to = ($toRaw === 'Inf' || $toRaw === '+Inf') ? PHP_INT_MAX : (int)$toRaw;
188
+            $from = $fromRaw === '-Inf' ? PHP_INT_MIN : (int) $fromRaw;
189
+            $to = ($toRaw === 'Inf' || $toRaw === '+Inf') ? PHP_INT_MAX : (int) $toRaw;
190 190
             if (($startChar === '[' && $endChar === ']' && $from <= $count && $count <= $to) ||
191 191
                 ($startChar === ']' && $endChar === ']' && $from < $count && $count <= $to) ||
192 192
                 ($startChar === ']' && $endChar === '[' && $from < $count && $count < $to) ||
Please login to merge, or discard this patch.