@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | return $this->getTranslatedTextFromResponse($translateResponse); |
87 | 87 | } |
88 | 88 | |
89 | - throw new TranslationErrorException('Translate error, error_code : '.$translateResponse['errorCode'].'. Refer url: http://ai.youdao.com/docs/api.s'); |
|
89 | + throw new TranslationErrorException('Translate error, error_code : ' . $translateResponse['errorCode'] . '. Refer url: http://ai.youdao.com/docs/api.s'); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | { |
109 | 109 | $salt = md5(time()); |
110 | 110 | $query = [ |
111 | - 'sign' => md5($this->config['appKey'].$text.$salt.$this->config['appSecret']), |
|
111 | + 'sign' => md5($this->config['appKey'] . $text . $salt . $this->config['appSecret']), |
|
112 | 112 | 'appKey' => $this->config['appKey'], |
113 | 113 | 'salt' => $salt, |
114 | 114 | ]; |
115 | 115 | |
116 | - return $this->api.http_build_query($query).'&q='.urlencode($text); |
|
116 | + return $this->api . http_build_query($query) . '&q=' . urlencode($text); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |