Skip to content

Commit

Permalink
Fix code with Laravel Pint
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot committed Aug 23, 2023
1 parent aa07d56 commit 8580842
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Config implements Contracts\ConfigInterface
public function __construct($key, $secret, $callbackUri, array $additionalProviderConfig = [])
{
$this->config = array_merge([
'client_id' => $key,
'client_id' => $key,
'client_secret' => $secret,
'redirect' => $this->formatRedirectUri($callbackUri),
'redirect' => $this->formatRedirectUri($callbackUri),
], $additionalProviderConfig);
}

Expand Down
4 changes: 2 additions & 2 deletions src/OAuth1/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ protected function getToken()
]);

return $this->server->getTokenCredentials(
$temp, $this->request->get('oauth_token'), $this->request->get('oauth_verifier')
);
$temp, $this->request->get('oauth_token'), $this->request->get('oauth_verifier')
);

Check warning on line 176 in src/OAuth1/AbstractProvider.php

View check run for this annotation

Codecov / codecov/patch

src/OAuth1/AbstractProvider.php#L175-L176

Added lines #L175 - L176 were not covered by tests
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/OAuth1/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getTokenCredentials(TemporaryCredentials $temporaryCredentials,
try {
if ($client instanceof Client) {
$response = $client->post($uri, [
'headers' => $headers,
'headers' => $headers,

Check warning on line 68 in src/OAuth1/Server.php

View check run for this annotation

Codecov / codecov/patch

src/OAuth1/Server.php#L68

Added line #L68 was not covered by tests
'form_params' => $bodyParameters,
]);
} else {
Expand All @@ -76,7 +76,7 @@ public function getTokenCredentials(TemporaryCredentials $temporaryCredentials,
}

return [
'tokenCredentials' => $this->createTokenCredentials($response->getBody()),
'tokenCredentials' => $this->createTokenCredentials($response->getBody()),

Check warning on line 79 in src/OAuth1/Server.php

View check run for this annotation

Codecov / codecov/patch

src/OAuth1/Server.php#L79

Added line #L79 was not covered by tests
'credentialsResponseBody' => $response->getBody(),
];
}
Expand Down
4 changes: 2 additions & 2 deletions src/OAuth2/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function user()
}

return $this->user->setToken($token)
->setRefreshToken($this->parseRefreshToken($response))
->setExpiresIn($this->parseExpiresIn($response));
->setRefreshToken($this->parseRefreshToken($response))
->setExpiresIn($this->parseExpiresIn($response));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/ManagerTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected function oauth2ProviderStub(): MockInterface
{
static $provider = null;

if (is_null($provider)) {
if ($provider === null) {
$provider = $this->mockStub('OAuth2ProviderStub')->shouldDeferMissing();
}

Expand All @@ -128,7 +128,7 @@ protected function oauth1ProviderStub(): MockInterface
{
static $provider = null;

if (is_null($provider)) {
if ($provider === null) {
$provider = $this->mockStub('OAuth1ProviderStub');
}

Expand Down
1 change: 1 addition & 0 deletions tests/Stubs/OAuth2ProviderStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class OAuth2ProviderStub extends AbstractProvider
{
protected $test = 'test';

public const IDENTIFIER = 'TEST';

/**
Expand Down

0 comments on commit 8580842

Please sign in to comment.