@@ -18,7 +18,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -352,7 +352,7 @@ |
||
| 352 | 352 | return $responseArray; |
| 353 | 353 | } else { |
| 354 | 354 | if (is_array($responseArray[0])) { |
| 355 | - return array_reduce($responseArray[0], function ($carry, $item) { |
|
| 355 | + return array_reduce($responseArray[0], function($carry, $item) { |
|
| 356 | 356 | $carry .= $item[0]; |
| 357 | 357 | return $carry; |
| 358 | 358 | }); |
@@ -388,7 +388,7 @@ |
||
| 388 | 388 | * @throws ErrorException If the HTTP request fails |
| 389 | 389 | * @throws UnexpectedValueException If received data cannot be decoded |
| 390 | 390 | * |
| 391 | - * @return string|bool Translated text |
|
| 391 | + * @return string Translated text |
|
| 392 | 392 | */ |
| 393 | 393 | private static function staticTranslate($source, $target, $string) |
| 394 | 394 | { |