@@ -62,6 +62,8 @@ |
||
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * {@inheritdoc}. |
| 65 | + * @param string $url |
|
| 66 | + * @param string $state |
|
| 65 | 67 | */ |
| 66 | 68 | protected function buildAuthUrlFromBase($url, $state) |
| 67 | 69 | { |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | ]; |
| 145 | 145 | } |
| 146 | 146 | return [ |
| 147 | - 'access_token'=>$this->config['longlive_access_token'], |
|
| 147 | + 'access_token'=>$this->config['longlive_access_token'], |
|
| 148 | 148 | 'code'=>$code, |
| 149 | 149 | ]; |
| 150 | 150 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | } |
| 175 | 175 | // !!应该尽量不要调用, 除非 单独与overture/wechat使用, 否则同时获取accesstoken, 会冲突 |
| 176 | 176 | public function getLongiveAccessToken($forse_refresh = false) |
| 177 | - { |
|
| 177 | + { |
|
| 178 | 178 | $getTokenUrl = $this->getTokenUrl(); |
| 179 | 179 | $response = $this->getHttpClient()->get($getTokenUrl, [ |
| 180 | 180 | 'query' => $this->getTokenFields(), |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | protected function getTokenFields($code = false) |
| 138 | 138 | { |
| 139 | 139 | |
| 140 | - if (!$code){ |
|
| 140 | + if (!$code) { |
|
| 141 | 141 | return [ |
| 142 | 142 | 'corpid' => $this->clientId, |
| 143 | 143 | 'corpsecret' => $this->clientSecret, |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | public function getAccessToken($code) |
| 159 | 159 | { |
| 160 | 160 | //没有指定则自己获取 |
| 161 | - if (!$this->config['longlive_access_token']){ |
|
| 161 | + if (!$this->config['longlive_access_token']) { |
|
| 162 | 162 | $this->config['longlive_access_token'] = $this->getLongiveAccessToken(); |
| 163 | 163 | } |
| 164 | 164 | $param = $this->getTokenFields($code); |