Skip to content

Commit

Permalink
Apply fixes from StyleCI (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed May 1, 2020
1 parent 9cb6112 commit f9d9050
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Providers/DouYinProvider.php
Expand Up @@ -138,7 +138,8 @@ protected function getUserByToken(AccessTokenInterface $token)
$userUrl = $this->baseUrl.'/oauth/userinfo/';

$response = $this->getHttpClient()->get(
$userUrl, [
$userUrl,
[
'query' => [
'access_token' => $token->getToken(),
'open_id' => $token['open_id'],
Expand Down
6 changes: 4 additions & 2 deletions src/Providers/GitHubProvider.php
Expand Up @@ -52,7 +52,8 @@ protected function getUserByToken(AccessTokenInterface $token)
$userUrl = 'https://api.github.com/user';

$response = $this->getHttpClient()->get(
$userUrl, $this->createAuthorizationHeaders($token)
$userUrl,
$this->createAuthorizationHeaders($token)
);

$user = json_decode($response->getBody(), true);
Expand All @@ -77,7 +78,8 @@ protected function getEmailByToken($token)

try {
$response = $this->getHttpClient()->get(
$emailsUrl, $this->createAuthorizationHeaders($token)
$emailsUrl,
$this->createAuthorizationHeaders($token)
);
} catch (Exception $e) {
return;
Expand Down
3 changes: 2 additions & 1 deletion src/Providers/OutlookProvider.php
Expand Up @@ -57,7 +57,8 @@ protected function getUserByToken(AccessTokenInterface $token)
'Accept' => 'application/json',
'Authorization' => 'Bearer '.$token->getToken(),
],
]);
]
);

return json_decode($response->getBody()->getContents(), true);
}
Expand Down

0 comments on commit f9d9050

Please sign in to comment.