Skip to content

Commit

Permalink
Update docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Stichoza committed Nov 29, 2022
1 parent bc5d1df commit 69b5573
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/GoogleTranslate.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ public function getLastDetectedSource(): ?string
* @param array $options
* @param TokenProviderInterface|null $tokenProvider
* @return null|string
* @throws ErrorException If the HTTP request fails
* @throws UnexpectedValueException If received data cannot be decoded
* @throws LargeTextException If translation text is too large
* @throws RateLimitException If Google has blocked you for excessive requests
* @throws TranslationRequestException If any other HTTP related error occurs
* @throws TranslationDecodingException If response JSON cannot be decoded
*/
public static function trans(string $string, string $target = 'en', string $source = null, array $options = [], TokenProviderInterface $tokenProvider = null): ?string
{
Expand All @@ -232,8 +234,10 @@ public static function trans(string $string, string $target = 'en', string $sour
*
* @param string $string String to translate
* @return string|null
* @throws ErrorException If the HTTP request fails
* @throws UnexpectedValueException If received data cannot be decoded
* @throws LargeTextException If translation text is too large
* @throws RateLimitException If Google has blocked you for excessive requests
* @throws TranslationRequestException If any other HTTP related error occurs
* @throws TranslationDecodingException If response JSON cannot be decoded
*/
public function translate(string $string): ?string
{
Expand Down Expand Up @@ -294,9 +298,11 @@ public function translate(string $string): ?string
* Get response array.
*
* @param string $string String to translate
* @throws ErrorException If the HTTP request fails
* @throws UnexpectedValueException If received data cannot be decoded
* @return array Response
* @throws LargeTextException If translation text is too large
* @throws RateLimitException If Google has blocked you for excessive requests
* @throws TranslationRequestException If any other HTTP related error occurs
* @throws TranslationDecodingException If response JSON cannot be decoded
*/
public function getResponse(string $string): array
{
Expand Down

0 comments on commit 69b5573

Please sign in to comment.