Passed
Push — master ( 273c7d...4c8747 )
by ma
02:37
created
src/Gateways/Douyin.php 1 patch
Braces   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
              * https://developer.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/account-permission/douyin-default-get-permission-code
76 76
              */
77 77
             return $this->AuthorizeSilenceURL . '?' . http_build_query($params);
78
-        }else{
78
+        } else{
79 79
             return $this->AuthorizeURL . '?' . http_build_query($params);
80 80
         }
81 81
     }
@@ -138,10 +138,10 @@  discard block
 block discarded – undo
138 138
                 throw new OAuthException("Douyin APP登录 需要传输access_token参数! ");
139 139
             }
140 140
             $this->token['access_token'] = $_REQUEST['access_token'];
141
-        }elseif ($this->type == 'applets'){
141
+        } elseif ($this->type == 'applets'){
142 142
             //小程序
143 143
             return $this->applets();
144
-        }else {
144
+        } else {
145 145
             /** 获取token信息 */
146 146
             $this->getToken();
147 147
         }
@@ -218,8 +218,12 @@  discard block
 block discarded – undo
218 218
             'appid'      => $this->config['app_id'],
219 219
             'secret'     => $this->config['app_secret'],
220 220
         ];
221
-        if(isset($_REQUEST['code'])) $params['code'] = $_REQUEST['code'];
222
-        if(isset($_REQUEST['anonymous_code'])) $params['anonymous_code'] = $_REQUEST['anonymous_code'];
221
+        if(isset($_REQUEST['code'])) {
222
+            $params['code'] = $_REQUEST['code'];
223
+        }
224
+        if(isset($_REQUEST['anonymous_code'])) {
225
+            $params['anonymous_code'] = $_REQUEST['anonymous_code'];
226
+        }
223 227
 
224 228
         return $params;
225 229
     }
@@ -237,7 +241,7 @@  discard block
 block discarded – undo
237 241
         $data = json_decode($token, true);
238 242
         if (isset($data['data']['access_token'])) {
239 243
             return $data['data'];
240
-        }elseif (isset($data['session_key'])){
244
+        } elseif (isset($data['session_key'])){
241 245
             //小程序登录
242 246
             return $data;
243 247
         } else {
Please login to merge, or discard this patch.
src/Gateways/Qq.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
                 throw new OAuthException("腾讯QQ,APP登录 需要传输access_token参数! ");
118 118
             }
119 119
             $this->token['access_token'] = $_REQUEST['access_token'];
120
-        }else{
120
+        } else{
121 121
             /** 获取token */
122 122
             $this->getToken();
123 123
         }
Please login to merge, or discard this patch.
src/Gateways/Alipay.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
                 throw new OAuthException("AliPay APP登录 需要传输access_token参数! ");
143 143
             }
144 144
             $this->token['access_token'] = $_REQUEST['access_token'];
145
-        }else {
145
+        } else {
146 146
             /** 获取token信息 */
147 147
             $this->getToken();
148 148
         }
Please login to merge, or discard this patch.
src/Gateways/Wechat.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
                 throw new OAuthException("Wechat APP登录 需要传输access_token参数! ");
136 136
             }
137 137
             $this->token['access_token'] = $_REQUEST['access_token'];
138
-        }elseif ($this->type == 'applets'){
138
+        } elseif ($this->type == 'applets'){
139 139
             //小程序
140 140
             return $this->applets();
141
-        }else {
141
+        } else {
142 142
             /** 获取token信息 */
143 143
             $this->getToken();
144 144
         }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $data = json_decode($token, true);
220 220
         if (isset($data['access_token'])) {
221 221
             return $data;
222
-        }elseif (isset($data['session_key'])){
222
+        } elseif (isset($data['session_key'])){
223 223
             //小程序登录
224 224
             return $data;
225 225
         } else {
Please login to merge, or discard this patch.
src/Gateways/Facebook.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
                 throw new OAuthException("Facebook APP登录 需要传输access_token参数! ");
97 97
             }
98 98
             $this->token['access_token'] = $_REQUEST['access_token'];
99
-        }else {
99
+        } else {
100 100
             $this->getToken();
101 101
         }
102 102
         $fields = isset($this->config['fields']) ? $this->config['fields'] : 'id,name,gender,picture.width(400)';
Please login to merge, or discard this patch.