Skip to content

Commit 69b5573

Browse files
committed
Update docblocks
1 parent bc5d1df commit 69b5573

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/GoogleTranslate.php

+12-6
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,10 @@ public function getLastDetectedSource(): ?string
211211
* @param array $options
212212
* @param TokenProviderInterface|null $tokenProvider
213213
* @return null|string
214-
* @throws ErrorException If the HTTP request fails
215-
* @throws UnexpectedValueException If received data cannot be decoded
214+
* @throws LargeTextException If translation text is too large
215+
* @throws RateLimitException If Google has blocked you for excessive requests
216+
* @throws TranslationRequestException If any other HTTP related error occurs
217+
* @throws TranslationDecodingException If response JSON cannot be decoded
216218
*/
217219
public static function trans(string $string, string $target = 'en', string $source = null, array $options = [], TokenProviderInterface $tokenProvider = null): ?string
218220
{
@@ -232,8 +234,10 @@ public static function trans(string $string, string $target = 'en', string $sour
232234
*
233235
* @param string $string String to translate
234236
* @return string|null
235-
* @throws ErrorException If the HTTP request fails
236-
* @throws UnexpectedValueException If received data cannot be decoded
237+
* @throws LargeTextException If translation text is too large
238+
* @throws RateLimitException If Google has blocked you for excessive requests
239+
* @throws TranslationRequestException If any other HTTP related error occurs
240+
* @throws TranslationDecodingException If response JSON cannot be decoded
237241
*/
238242
public function translate(string $string): ?string
239243
{
@@ -294,9 +298,11 @@ public function translate(string $string): ?string
294298
* Get response array.
295299
*
296300
* @param string $string String to translate
297-
* @throws ErrorException If the HTTP request fails
298-
* @throws UnexpectedValueException If received data cannot be decoded
299301
* @return array Response
302+
* @throws LargeTextException If translation text is too large
303+
* @throws RateLimitException If Google has blocked you for excessive requests
304+
* @throws TranslationRequestException If any other HTTP related error occurs
305+
* @throws TranslationDecodingException If response JSON cannot be decoded
300306
*/
301307
public function getResponse(string $string): array
302308
{

0 commit comments

Comments
 (0)