Total Complexity | 10 |
Total Lines | 72 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class GoogleTranslator implements TranslatorInterface |
||
10 | { |
||
11 | protected $break = 0; |
||
12 | protected $called = 0; |
||
13 | protected $word; |
||
14 | protected $source_locale = null; |
||
15 | protected $target_locale; |
||
16 | |||
17 | public function __construct() |
||
18 | { |
||
19 | $this->target_locale = config('app.locale'); |
||
20 | } |
||
21 | |||
22 | public function word(string $word) |
||
23 | { |
||
24 | $this->word = $word; |
||
25 | return $this; |
||
26 | } |
||
27 | |||
28 | public function targetLocale(string $target_locale) |
||
32 | } |
||
33 | |||
34 | public function sourceLocale(string $source_locale) |
||
38 | } |
||
39 | |||
40 | |||
41 | private function randomUserAgent() |
||
49 | ], |
||
50 | ]; |
||
51 | } |
||
52 | |||
53 | public function translate() |
||
81 | } |
||
82 | } |
||
83 |