Passed
Push — master ( d850f4...7a3599 )
by ma
01:31
created
src/Gateways/Aliyun.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             'state'         => $this->config['state'],
40 40
             'scope'         => $this->config['scope'],
41 41
         ];
42
-        return $this->AuthorizeURL . '?' . http_build_query($params);
42
+        return $this->AuthorizeURL.'?'.http_build_query($params);
43 43
     }
44 44
 
45 45
     /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $this->openid();
80 80
 
81 81
         $headers = ['Authorization: Bearer '.$this->token['access_token']];
82
-        $data = $this->get($this->UserInfoURL, [],$headers);
82
+        $data = $this->get($this->UserInfoURL, [], $headers);
83 83
         return json_decode($data, true);
84 84
     }
85 85
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      * @author: JiaMeng <[email protected]>
102 102
      * Updater:
103 103
      */
104
-    protected function getToken(){
104
+    protected function getToken() {
105 105
         if (empty($this->token)) {
106 106
             /** 验证state参数 */
107 107
             $this->CheckState();
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
             $params = $this->accessTokenParams();
111 111
 
112 112
             /** 获取access_token */
113
-            $this->AccessTokenURL = $this->AccessTokenURL . '?' . http_build_query($params);
114
-            $token =  $this->post($this->AccessTokenURL);
113
+            $this->AccessTokenURL = $this->AccessTokenURL.'?'.http_build_query($params);
114
+            $token = $this->post($this->AccessTokenURL);
115 115
             /** 解析token值(子类实现此方法) */
116 116
             $this->token = $this->parseToken($token);
117 117
         }
Please login to merge, or discard this patch.
src/Helper/ConstCode.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@  discard block
 block discarded – undo
6 6
 
7 7
 use tinymeng\tools\Tool;
8 8
 
9
-class ConstCode{
9
+class ConstCode {
10 10
 
11 11
     /** 公共状态 */
12
-    const STATUS_DELETE = 0;//删除
13
-    const STATUS_NORMAL = 1;//正常
12
+    const STATUS_DELETE = 0; //删除
13
+    const STATUS_NORMAL = 1; //正常
14 14
 
15 15
     /** 性别 */
16
-    const GENDER = 0;//未知
17
-    const GENDER_MAN = 1;//男
18
-    const GENDER_WOMEN = 2;//女
16
+    const GENDER = 0; //未知
17
+    const GENDER_MAN = 1; //男
18
+    const GENDER_WOMEN = 2; //女
19 19
 
20 20
     /** 登录类型 */
21 21
     const TYPE_QQ               = 1; //QQ
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     const TYPE_FACEBOOK         = 7; //faceBook
28 28
     const TYPE_GOOGLE           = 8; //google
29 29
     const TYPE_TWITTER          = 9; //飞鸽
30
-    const TYPE_LINE             = 10;//line
31
-    const TYPE_NAVER             = 11;//naver
30
+    const TYPE_LINE             = 10; //line
31
+    const TYPE_NAVER = 11; //naver
32 32
     const TYPE_ALIYUN           = 12; //阿里云
33 33
 
34 34
     const TYPE_QQ_APP           = 21; //qqAPP
@@ -47,24 +47,24 @@  discard block
 block discarded – undo
47 47
      * @param bool $type 类型:app applets
48 48
      * @return int
49 49
      */
50
-    static public function getTypeConst($channel,$type="")
50
+    static public function getTypeConst($channel, $type = "")
51 51
     {
52
-        switch ($channel){
52
+        switch ($channel) {
53 53
             case self::TYPE_QQ:
54
-                if($type == 'app'){
55
-                    $typeConst = self::TYPE_QQ_APP;//qqApp
56
-                }else{
54
+                if ($type == 'app') {
55
+                    $typeConst = self::TYPE_QQ_APP; //qqApp
56
+                } else {
57 57
                     $typeConst = $channel;
58 58
                 }
59 59
                 break;
60 60
             case self::TYPE_WECHAT:
61
-                if($type == 'app'){
62
-                    $typeConst = self::TYPE_WECHAT_APP;//微信App
63
-                }else if($type == 'applets'){
64
-                    $typeConst =  self::TYPE_WECHAT_APPLETS;//微信小程序
65
-                }else if(Tool::isWeiXin()){
66
-                    $typeConst =  self::TYPE_WECHAT_MOBILE;//微信mobile
67
-                }else{
61
+                if ($type == 'app') {
62
+                    $typeConst = self::TYPE_WECHAT_APP; //微信App
63
+                } else if ($type == 'applets') {
64
+                    $typeConst = self::TYPE_WECHAT_APPLETS; //微信小程序
65
+                } else if (Tool::isWeiXin()) {
66
+                    $typeConst = self::TYPE_WECHAT_MOBILE; //微信mobile
67
+                } else {
68 68
                     $typeConst = $channel;
69 69
                 }
70 70
                 break;
Please login to merge, or discard this patch.