Completed
Pull Request — master (#68)
by André
08:04 queued 05:16
created
src/Translator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -245,12 +245,12 @@
 block discarded – undo
245 245
      * This can be called from instance method translate() using __call() magic method.
246 246
      * Use $instance->translate($string) instead.
247 247
      *
248
-     * @param string $data Text or array of texts to translate
249 248
      *
250 249
      * @throws InvalidArgumentException If the provided argument is not of type 'string'
251 250
      * @throws ErrorException           If the HTTP request fails
252 251
      * @throws UnexpectedValueException If received data cannot be decoded
253 252
      *
253
+     * @param string $string
254 254
      * @return string|bool Translated text
255 255
      */
256 256
     protected function translateText($string)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
         }
313 313
 
314 314
         if (is_array($responseArray[0])) {
315
-            return array_reduce($responseArray[0], function ($carry, $item) {
315
+            return array_reduce($responseArray[0], function($carry, $item) {
316 316
                 $carry .= $item[0];
317 317
 
318 318
                 return $carry;
@@ -341,6 +341,6 @@  discard block
 block discarded – undo
341 341
      */
342 342
     public function isValidLocale($lang)
343 343
     {
344
-        return (bool)preg_match('/^([a-z]{2})(-[A-Z]{2})?$/', $lang);
344
+        return (bool) preg_match('/^([a-z]{2})(-[A-Z]{2})?$/', $lang);
345 345
     }
346 346
 }
Please login to merge, or discard this patch.
src/TranslateClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,10 +115,10 @@
 block discarded – undo
115 115
             throw new BadMethodCallException("Method [{$methodName}] does not exist");
116 116
         }
117 117
 
118
-        $reflectionMethod = new \ReflectionMethod (self::getInstance(), $methodName);
118
+        $reflectionMethod = new \ReflectionMethod(self::getInstance(), $methodName);
119 119
         $minimumArgs = $reflectionMethod->getNumberOfRequiredParameters();
120 120
         if (count($args) < $minimumArgs) {
121
-            throw new InvalidArgumentException("Expecting $minimumArgs parameter" . ($minimumArgs == 1 ? '' : 's'));
121
+            throw new InvalidArgumentException("Expecting $minimumArgs parameter".($minimumArgs == 1 ? '' : 's'));
122 122
         }
123 123
 
124 124
         return call_user_func_array([self::getInstance(), $methodName], $args);
Please login to merge, or discard this patch.
src/Tokens/GoogleTokenGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         }
69 69
         $a = fmod($a, pow(10, 6));
70 70
 
71
-        return $a . '.' . ($a ^ $b);
71
+        return $a.'.'.($a ^ $b);
72 72
     }
73 73
 
74 74
     /**
Please login to merge, or discard this patch.