Completed
Push — master ( b21bb7...fd130c )
by Carlos
01:04
created
src/Providers/OpenWeWork.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     protected function getUser(string $token, string $code): array
109 109
     {
110 110
         $response = $this->getHttpClient()->get(
111
-            $this->baseUrl . '/cgi-bin/user/getuserinfo3rd',
111
+            $this->baseUrl.'/cgi-bin/user/getuserinfo3rd',
112 112
             [
113 113
                 'query' => array_filter(
114 114
                     [
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $response = \json_decode($response->getBody(), true) ?? [];
123 123
 
124 124
         if (($response['errcode'] ?? 1) > 0 || (empty($response['UserId']) && empty($response['open_userid']))) {
125
-            throw new AuthorizeFailedException('Failed to get user openid:' . $response['errmsg'] ?? 'Unknown.', $response);
125
+            throw new AuthorizeFailedException('Failed to get user openid:'.$response['errmsg'] ?? 'Unknown.', $response);
126 126
         }
127 127
 
128 128
         return $response;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     protected function getUserByTicket(string $userTicket): array
139 139
     {
140 140
         $response = $this->getHttpClient()->post(
141
-            $this->baseUrl . '/cgi-bin/user/get',
141
+            $this->baseUrl.'/cgi-bin/user/get',
142 142
             [
143 143
                 'query' => [
144 144
                     'suite_access_token' => $this->getSuiteAccessToken(),
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         $response = \json_decode($response->getBody(), true) ?? [];
151 151
 
152 152
         if (($response['errcode'] ?? 1) > 0 || empty($response['userid'])) {
153
-            throw new AuthorizeFailedException('Failed to get user:' . $response['errmsg'] ?? 'Unknown.', $response);
153
+            throw new AuthorizeFailedException('Failed to get user:'.$response['errmsg'] ?? 'Unknown.', $response);
154 154
         }
155 155
 
156 156
         return $response;
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     protected function requestSuiteAccessToken(): string
190 190
     {
191 191
         $response = $this->getHttpClient()->get(
192
-            $this->baseUrl . '/cgi-bin/get_suite_token',
192
+            $this->baseUrl.'/cgi-bin/get_suite_token',
193 193
             [
194 194
                 'query' => array_filter(
195 195
                     [
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         $response = \json_decode($response->getBody(), true) ?? [];
205 205
 
206 206
         if (($response['errcode'] ?? 1) > 0) {
207
-            throw new AuthorizeFailedException('Failed to get api access_token:' . $response['errmsg'] ?? 'Unknown.', $response);
207
+            throw new AuthorizeFailedException('Failed to get api access_token:'.$response['errmsg'] ?? 'Unknown.', $response);
208 208
         }
209 209
 
210 210
         return $response['suite_access_token'];
Please login to merge, or discard this patch.
src/Providers/DouYin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function getAuthUrl(): string
21 21
     {
22
-        return $this->buildAuthUrlFromBase($this->baseUrl . '/platform/oauth/connect/');
22
+        return $this->buildAuthUrlFromBase($this->baseUrl.'/platform/oauth/connect/');
23 23
     }
24 24
 
25 25
     public function getCodeFields(): array
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     protected function getTokenUrl(): string
36 36
     {
37
-        return $this->baseUrl . '/oauth/access_token/';
37
+        return $this->baseUrl.'/oauth/access_token/';
38 38
     }
39 39
 
40 40
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     protected function getUserByToken(string $token): array
79 79
     {
80
-        $userUrl = $this->baseUrl . '/oauth/userinfo/';
80
+        $userUrl = $this->baseUrl.'/oauth/userinfo/';
81 81
 
82 82
         if (empty($this->openId)) {
83 83
             throw new InvalidArgumentException('please set open_id before your query.');
Please login to merge, or discard this patch.
src/Providers/FeiShu.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     protected function getAuthUrl(): string
29 29
     {
30
-        return $this->buildAuthUrlFromBase($this->baseUrl . '/authen/v1/index');
30
+        return $this->buildAuthUrlFromBase($this->baseUrl.'/authen/v1/index');
31 31
     }
32 32
 
33 33
     protected function getCodeFields(): array
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     protected function getTokenUrl(): string
42 42
     {
43
-        return $this->baseUrl . '/authen/v1/access_token';
43
+        return $this->baseUrl.'/authen/v1/access_token';
44 44
     }
45 45
 
46 46
     /**
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
     protected function getUserByToken(string $token): array
96 96
     {
97 97
         $response = $this->getHttpClient()->get(
98
-            $this->baseUrl . '/authen/v1/user_info',
98
+            $this->baseUrl.'/authen/v1/user_info',
99 99
             [
100
-                'headers' => ['Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $token],
100
+                'headers' => ['Content-Type' => 'application/json', 'Authorization' => 'Bearer '.$token],
101 101
                 'query' => array_filter(
102 102
                     [
103 103
                         'user_access_token' => $token,
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $response = \json_decode($response->getBody(), true) ?? [];
110 110
 
111 111
         if (empty($response['data'])) {
112
-            throw new \InvalidArgumentException('You have error! ' . json_encode($response, JSON_UNESCAPED_UNICODE));
112
+            throw new \InvalidArgumentException('You have error! '.json_encode($response, JSON_UNESCAPED_UNICODE));
113 113
         }
114 114
 
115 115
         return $response['data'];
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     protected function configAppAccessToken()
167 167
     {
168
-        $url = $this->baseUrl . '/auth/v3/app_access_token/';
168
+        $url = $this->baseUrl.'/auth/v3/app_access_token/';
169 169
         $params = [
170 170
             'json' => [
171 171
                 'app_id' => $this->config->get('client_id'),
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         ];
176 176
 
177 177
         if ($this->isInternalApp) {
178
-            $url = $this->baseUrl . '/auth/v3/app_access_token/internal/';
178
+            $url = $this->baseUrl.'/auth/v3/app_access_token/internal/';
179 179
             $params = [
180 180
                 'json' => [
181 181
                     'app_id' => $this->config->get('client_id'),
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      */
206 206
     protected function configTenantAccessToken()
207 207
     {
208
-        $url = $this->baseUrl . '/auth/v3/tenant_access_token/';
208
+        $url = $this->baseUrl.'/auth/v3/tenant_access_token/';
209 209
         $params = [
210 210
             'json' => [
211 211
                 'app_id' => $this->config->get('client_id'),
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         ];
216 216
 
217 217
         if ($this->isInternalApp) {
218
-            $url = $this->baseUrl . '/auth/v3/tenant_access_token/internal/';
218
+            $url = $this->baseUrl.'/auth/v3/tenant_access_token/internal/';
219 219
             $params = [
220 220
                 'json' => [
221 221
                     'app_id' => $this->config->get('client_id'),
Please login to merge, or discard this patch.
src/Providers/WeWork.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     protected function getUser(string $token, string $code): array
133 133
     {
134 134
         $response = $this->getHttpClient()->get(
135
-            $this->baseUrl . '/cgi-bin/user/getuserinfo',
135
+            $this->baseUrl.'/cgi-bin/user/getuserinfo',
136 136
             [
137 137
                 'query' => array_filter(
138 138
                     [
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $response = \json_decode($response->getBody(), true) ?? [];
147 147
 
148 148
         if (($response['errcode'] ?? 1) > 0 || (empty($response['UserId']) && empty($response['OpenId']))) {
149
-            throw new AuthorizeFailedException('Failed to get user openid:' . $response['errmsg'] ?? 'Unknown.', $response);
149
+            throw new AuthorizeFailedException('Failed to get user openid:'.$response['errmsg'] ?? 'Unknown.', $response);
150 150
         } elseif (empty($response['UserId'])) {
151 151
             $this->detailed = false;
152 152
         }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     protected function getUserById(string $userId): array
162 162
     {
163 163
         $response = $this->getHttpClient()->post(
164
-            $this->baseUrl . '/cgi-bin/user/get',
164
+            $this->baseUrl.'/cgi-bin/user/get',
165 165
             [
166 166
                 'query' => [
167 167
                     'access_token' => $this->getApiAccessToken(),
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         $response = \json_decode($response->getBody(), true) ?? [];
174 174
 
175 175
         if (($response['errcode'] ?? 1) > 0 || empty($response['userid'])) {
176
-            throw new AuthorizeFailedException('Failed to get user:' . $response['errmsg'] ?? 'Unknown.', $response);
176
+            throw new AuthorizeFailedException('Failed to get user:'.$response['errmsg'] ?? 'Unknown.', $response);
177 177
         }
178 178
 
179 179
         return $response;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
     protected function requestApiAccessToken(): string
213 213
     {
214 214
         $response = $this->getHttpClient()->get(
215
-            $this->baseUrl . '/cgi-bin/gettoken',
215
+            $this->baseUrl.'/cgi-bin/gettoken',
216 216
             [
217 217
                 'query' => array_filter(
218 218
                     [
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         $response = \json_decode($response->getBody(), true) ?? [];
227 227
 
228 228
         if (($response['errcode'] ?? 1) > 0) {
229
-            throw new AuthorizeFailedException('Failed to get api access_token:' . $response['errmsg'] ?? 'Unknown.', $response);
229
+            throw new AuthorizeFailedException('Failed to get api access_token:'.$response['errmsg'] ?? 'Unknown.', $response);
230 230
         }
231 231
 
232 232
         return $response['access_token'];
Please login to merge, or discard this patch.