@@ -20,7 +20,7 @@ |
||
20 | 20 | /** |
21 | 21 | * create url post. |
22 | 22 | * |
23 | - * @param $url |
|
23 | + * @param string $url |
|
24 | 24 | * @param $data |
25 | 25 | * @param $header |
26 | 26 | * @param int $post |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | //处理key |
33 | 33 | if (strpos($kk, '#') === false) { |
34 | - $key = '#'.$kk.'#'; |
|
34 | + $key = '#' . $kk . '#'; |
|
35 | 35 | } else { |
36 | 36 | $key = $kk; |
37 | 37 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $value = urlencode($vv); |
43 | 43 | } |
44 | 44 | |
45 | - $data = $data.$key.'='.$value.'&'; |
|
45 | + $data = $data . $key . '=' . $value . '&'; |
|
46 | 46 | } |
47 | 47 | $data = trim($data, '&'); |
48 | 48 | //生成query params |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $header = ["Accept:application/$this->BodyType", "Content-Type:application/$this->BodyType;charset=utf-8"]; |
52 | 52 | // 生成请求URL |
53 | 53 | $query = http_build_query($body); |
54 | - $url = 'http://v.juhe.cn/sms/send?'.$query; |
|
54 | + $url = 'http://v.juhe.cn/sms/send?' . $query; |
|
55 | 55 | // 发送请求 |
56 | 56 | $result = $this->curl_post($url, $body, $header, 0); |
57 | 57 |
@@ -122,11 +122,11 @@ |
||
122 | 122 | public function send() |
123 | 123 | { |
124 | 124 | if ($this->config === 'YunTongXun') { |
125 | - $rest = new Rest(config('sms.agents.'.$this->config)); |
|
125 | + $rest = new Rest(config('sms.agents.' . $this->config)); |
|
126 | 126 | |
127 | 127 | return $rest->sendTemplateSMS($this->smsData['to'], $this->smsData['templateData'], $this->smsData['templates']['YunTongXun']); |
128 | 128 | } elseif ($this->config === 'Juhe') { |
129 | - $rest = new Juhe(config('sms.agents.'.$this->config)); |
|
129 | + $rest = new Juhe(config('sms.agents.' . $this->config)); |
|
130 | 130 | |
131 | 131 | return $rest->sendTemplateSMS($this->smsData['to'], $this->smsData['templateData'], $this->smsData['templates']['Juhe']); |
132 | 132 | } else { |