Passed
Push — master ( 7d7f87...8d60a4 )
by ma
01:36
created
src/Gateways/Twitter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $this->saveState();
28 28
         //登录参数
29 29
         $oauthToken = $this->call('oauth/request_token', ['oauth_callback' => $this->config['callback']], 'POST');
30
-        return self::API_BASE . 'oauth/authenticate?oauth_token=' . $oauthToken['oauth_token'];
30
+        return self::API_BASE.'oauth/authenticate?oauth_token='.$oauthToken['oauth_token'];
31 31
     }
32 32
 
33 33
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             if (isset($this->token['oauth_token_secret'])) {
67 67
                 $this->tokenSecret = $this->token['oauth_token_secret'];
68 68
             } else {
69
-                throw new \Exception("获取Twitter ACCESS_TOKEN 出错:" . json_encode($this->token));
69
+                throw new \Exception("获取Twitter ACCESS_TOKEN 出错:".json_encode($this->token));
70 70
             }
71 71
         }
72 72
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $method  = strtoupper($method);
87 87
         $request = [
88 88
             'method' => $method,
89
-            'uri'    => self::API_BASE . $api,
89
+            'uri'    => self::API_BASE.$api,
90 90
         ];
91 91
         $oauthParams                    = $this->getOAuthParams($params);
92 92
         $oauthParams['oauth_signature'] = $this->signature($request, $oauthParams);
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
     {
132 132
         ksort($params);
133 133
         $sign_str = Str::buildParams($params, true);
134
-        $sign_str = $request['method'] . '&' . rawurlencode($request['uri']) . '&' . rawurlencode($sign_str);
135
-        $sign_key = $this->config['app_secret'] . '&' . $this->tokenSecret;
134
+        $sign_str = $request['method'].'&'.rawurlencode($request['uri']).'&'.rawurlencode($sign_str);
135
+        $sign_key = $this->config['app_secret'].'&'.$this->tokenSecret;
136 136
 
137 137
         return rawurlencode(base64_encode(hash_hmac('sha1', $sign_str, $sign_key, true)));
138 138
     }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     {
148 148
         $return = 'OAuth ';
149 149
         foreach ($params as $k => $param) {
150
-            $return .= $k . '="' . $param . '", ';
150
+            $return .= $k.'="'.$param.'", ';
151 151
         }
152 152
         return rtrim($return, ', ');
153 153
     }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      * 解析access_token方法请求后的返回值
169 169
      * @param string $token 获取access_token的方法的返回值
170 170
      */
171
-    protected function parseToken($token){
171
+    protected function parseToken($token) {
172 172
         return $token;
173 173
     }
174 174
 }
Please login to merge, or discard this patch.