@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | return $this->getTranslatedTextFromResponse($translateResponse); |
97 | 97 | } |
98 | 98 | |
99 | - throw new TranslationErrorException('Translate error, error_code : '.$translateResponse['errorCode'].'. Refer url: http://fanyi.youdao.com/openapi?path=data-mode'); |
|
99 | + throw new TranslationErrorException('Translate error, error_code : ' . $translateResponse['errorCode'] . '. Refer url: http://fanyi.youdao.com/openapi?path=data-mode'); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | { |
119 | 119 | $query = http_build_query($this->config); |
120 | 120 | |
121 | - return $this->api.$query.'&q='.urlencode($text); |
|
121 | + return $this->api . $query . '&q=' . urlencode($text); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | $query = http_build_query(['salt' => $salt, 'sign' => $sign, 'appKey' => $key]); |
138 | 138 | |
139 | - return $this->api_v2.$query.'&q='.urlencode($text); |
|
139 | + return $this->api_v2 . $query . '&q=' . urlencode($text); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |