@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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 |
||
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 | { |
@@ -390,7 +390,7 @@ |
||
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; |
@@ -213,7 +213,6 @@ |
||
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 | */ |