Completed
Pull Request — master (#64)
by
unknown
02:48
created
src/Stichoza/GoogleTranslate/Tokens/GoogleTokenGenerator.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      * @param string $source Source language
19 19
      * @param string $target Target language
20 20
      * @param string $text Text to translate
21
-     * @return mixed A token
21
+     * @return string A token
22 22
      */
23 23
     public function generateToken($source, $target, $text)
24 24
     {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * Process token data by applying multiple operations
89 89
      *
90 90
      * @param $a
91
-     * @param $b
91
+     * @param string $b
92 92
      * @return int
93 93
      */
94 94
     private function RL($a, $b)
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      *
133 133
      * @param string $str
134 134
      * @param int $index
135
-     * @return null|number
135
+     * @return string
136 136
      */
137 137
     private function charCodeAt($str, $index)
138 138
     {
Please login to merge, or discard this patch.
src/Stichoza/GoogleTranslate/TranslateClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
         if (isset($responseArray[count($responseArray) - 2][0][0])) {
345 345
             $detectedLanguages[] = $responseArray[count($responseArray) - 2][0][0];
346 346
         } elseif (isset($responseArray[1])) {
347
-+            $detectedLanguages[] = $responseArray[1];
347
++$detectedLanguages[] = $responseArray[1];
348 348
         }
349 349
 
350 350
         // Set initial detected language to null
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
             return $responseArray;
373 373
         } else {
374 374
             if (is_array($responseArray[0])) {
375
-                return array_reduce($responseArray[0], function ($carry, $item) {
375
+                return array_reduce($responseArray[0], function($carry, $item) {
376 376
                     $carry .= $item[0];
377 377
 
378 378
                     return $carry;
Please login to merge, or discard this patch.