Completed
Pull Request — master (#78)
by
unknown
02:54
created
src/Stichoza/GoogleTranslate/Tokens/GoogleTokenGenerator.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      * @param string $target Target language
18 18
      * @param string $text   Text to translate
19 19
      *
20
-     * @return mixed A token
20
+     * @return string A token
21 21
      */
22 22
     public function generateToken($source, $target, $text)
23 23
     {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * Process token data by applying multiple operations.
84 84
      *
85 85
      * @param $a
86
-     * @param $b
86
+     * @param string $b
87 87
      *
88 88
      * @return int
89 89
      */
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * @param string $str
135 135
      * @param int    $index
136 136
      *
137
-     * @return null|number
137
+     * @return string
138 138
      */
139 139
     private function charCodeAt($str, $index)
140 140
     {
Please login to merge, or discard this patch.
src/Stichoza/GoogleTranslate/TranslateClient.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -390,7 +390,7 @@
 block discarded – undo
390 390
             return $responseArray;
391 391
         } else {
392 392
             if (is_array($responseArray[0])) {
393
-                return array_reduce($responseArray[0], function ($carry, $item) {
393
+                return array_reduce($responseArray[0], function($carry, $item) {
394 394
                     $carry .= $item[0];
395 395
 
396 396
                     return $carry;
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -213,7 +213,6 @@
 block discarded – undo
213 213
     /**
214 214
      * Set the api we are used to translete.
215 215
      *
216
-     * @param string $source Google translate api, default is https://translate.google.com/translate_a/single
217 216
      *
218 217
      * @return TranslateClient
219 218
      */
Please login to merge, or discard this patch.