Completed
Pull Request — master (#4)
by Keal
03:43
created
src/lib/CurlTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/lib/Juhe.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/sms/Sms.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,11 +122,11 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.