Skip to content

Commit

Permalink
delint
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemilloy committed Dec 17, 2023
1 parent 2559e93 commit 0d2addc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GoogleTranslate.php
Expand Up @@ -118,7 +118,7 @@ class GoogleTranslate
public function __construct(string $target = 'en', string $source = null, array $options = [], TokenProviderInterface $tokenProvider = null, ?string $pattern = null)
{
$this->client = new Client();
$this->setTokenProvider($tokenProvider ?? new GoogleTokenGenerator())
$this->setTokenProvider($tokenProvider ?? new GoogleTokenGenerator)
->setOptions($options) // Options are already set in client constructor tho.
->setSource($source)
->setTarget($target)
Expand Down Expand Up @@ -224,8 +224,8 @@ public function getLastDetectedSource(): ?string
*/
public static function trans(string $string, string $target = 'en', string $source = null, array $options = [], TokenProviderInterface $tokenProvider = null, ?string $pattern = null): ?string
{
return (new self())
->setTokenProvider($tokenProvider ?? new GoogleTokenGenerator())
return (new self)
->setTokenProvider($tokenProvider ?? new GoogleTokenGenerator)
->setOptions($options) // Options are already set in client constructor tho.
->setSource($source)
->setTarget($target)
Expand Down

0 comments on commit 0d2addc

Please sign in to comment.