Skip to content

Commit c25dcec

Browse files
committed
Apply styleCI fixes
1 parent edb6966 commit c25dcec

17 files changed

+352
-352
lines changed

examples/public/api.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@
3333
function (ServerRequestInterface $request, ResponseInterface $response) use ($app) {
3434
$users = [
3535
[
36-
'id' => 123,
37-
'name' => 'Alex',
36+
'id' => 123,
37+
'name' => 'Alex',
3838
'email' => 'alex@thephpleague.com',
3939
],
4040
[
41-
'id' => 124,
42-
'name' => 'Frank',
41+
'id' => 124,
42+
'name' => 'Frank',
4343
'email' => 'frank@thephpleague.com',
4444
],
4545
[
46-
'id' => 125,
47-
'name' => 'Phil',
46+
'id' => 125,
47+
'name' => 'Phil',
4848
'email' => 'phil@thephpleague.com',
4949
],
5050
];

examples/public/auth_code.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
include __DIR__ . '/../vendor/autoload.php';
2525

2626
$app = new App([
27-
'settings' => [
27+
'settings' => [
2828
'displayErrorDetails' => true,
2929
],
3030
AuthorizationServer::class => function () {

examples/public/client_credentials.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
include __DIR__ . '/../vendor/autoload.php';
2121

2222
$app = new App([
23-
'settings' => [
23+
'settings' => [
2424
'displayErrorDetails' => true,
2525
],
2626
AuthorizationServer::class => function () {

examples/public/implicit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
include __DIR__ . '/../vendor/autoload.php';
2323

2424
$app = new App([
25-
'settings' => [
25+
'settings' => [
2626
'displayErrorDetails' => true,
2727
],
2828
AuthorizationServer::class => function () {

examples/public/middleware_use.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
include __DIR__ . '/../vendor/autoload.php';
2727

2828
$app = new App([
29-
'settings' => [
29+
'settings' => [
3030
'displayErrorDetails' => true,
3131
],
3232
AuthorizationServer::class => function () {
@@ -89,7 +89,7 @@
8989

9090
if (\in_array('basic', $request->getAttribute('oauth_scopes', []))) {
9191
$params = [
92-
'id' => 1,
92+
'id' => 1,
9393
'name' => 'Alex',
9494
'city' => 'London',
9595
];

examples/public/refresh_token.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
include __DIR__ . '/../vendor/autoload.php';
2222

2323
$app = new App([
24-
'settings' => [
24+
'settings' => [
2525
'displayErrorDetails' => true,
2626
],
2727
AuthorizationServer::class => function () {

examples/src/Repositories/ClientRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ public function validateClient($clientIdentifier, $clientSecret, $grantType)
3939
{
4040
$clients = [
4141
'myawesomeapp' => [
42-
'secret' => \password_hash('abc123', PASSWORD_BCRYPT),
43-
'name' => self::CLIENT_NAME,
44-
'redirect_uri' => self::REDIRECT_URI,
42+
'secret' => \password_hash('abc123', PASSWORD_BCRYPT),
43+
'name' => self::CLIENT_NAME,
44+
'redirect_uri' => self::REDIRECT_URI,
4545
'is_confidential' => true,
4646
],
4747
];

src/Grant/AuthCodeGrant.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,13 @@ public function completeAuthorizationRequest(AuthorizationRequest $authorization
366366
);
367367

368368
$payload = [
369-
'client_id' => $authCode->getClient()->getIdentifier(),
370-
'redirect_uri' => $authCode->getRedirectUri(),
371-
'auth_code_id' => $authCode->getIdentifier(),
372-
'scopes' => $authCode->getScopes(),
373-
'user_id' => $authCode->getUserIdentifier(),
374-
'expire_time' => (new DateTimeImmutable())->add($this->authCodeTTL)->getTimestamp(),
375-
'code_challenge' => $authorizationRequest->getCodeChallenge(),
369+
'client_id' => $authCode->getClient()->getIdentifier(),
370+
'redirect_uri' => $authCode->getRedirectUri(),
371+
'auth_code_id' => $authCode->getIdentifier(),
372+
'scopes' => $authCode->getScopes(),
373+
'user_id' => $authCode->getUserIdentifier(),
374+
'expire_time' => (new DateTimeImmutable())->add($this->authCodeTTL)->getTimestamp(),
375+
'code_challenge' => $authorizationRequest->getCodeChallenge(),
376376
'code_challenge_method' => $authorizationRequest->getCodeChallengeMethod(),
377377
];
378378

@@ -387,7 +387,7 @@ public function completeAuthorizationRequest(AuthorizationRequest $authorization
387387
$this->makeRedirectUri(
388388
$finalRedirectUri,
389389
[
390-
'code' => $this->encrypt($jsonPayload),
390+
'code' => $this->encrypt($jsonPayload),
391391
'state' => $authorizationRequest->getState(),
392392
]
393393
)

src/Grant/ImplicitGrant.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ public function completeAuthorizationRequest(AuthorizationRequest $authorization
207207
$finalRedirectUri,
208208
[
209209
'access_token' => (string) $accessToken,
210-
'token_type' => 'Bearer',
211-
'expires_in' => $accessToken->getExpiryDateTime()->getTimestamp() - \time(),
212-
'state' => $authorizationRequest->getState(),
210+
'token_type' => 'Bearer',
211+
'expires_in' => $accessToken->getExpiryDateTime()->getTimestamp() - \time(),
212+
'state' => $authorizationRequest->getState(),
213213
],
214214
$this->queryDelimiter
215215
)

src/ResponseTypes/BearerTokenResponse.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ public function generateHttpResponse(ResponseInterface $response)
2626
$expireDateTime = $this->accessToken->getExpiryDateTime()->getTimestamp();
2727

2828
$responseParams = [
29-
'token_type' => 'Bearer',
30-
'expires_in' => $expireDateTime - \time(),
29+
'token_type' => 'Bearer',
30+
'expires_in' => $expireDateTime - \time(),
3131
'access_token' => (string) $this->accessToken,
3232
];
3333

3434
if ($this->refreshToken instanceof RefreshTokenEntityInterface) {
3535
$refreshTokenPayload = \json_encode([
36-
'client_id' => $this->accessToken->getClient()->getIdentifier(),
36+
'client_id' => $this->accessToken->getClient()->getIdentifier(),
3737
'refresh_token_id' => $this->refreshToken->getIdentifier(),
38-
'access_token_id' => $this->accessToken->getIdentifier(),
39-
'scopes' => $this->accessToken->getScopes(),
40-
'user_id' => $this->accessToken->getUserIdentifier(),
41-
'expire_time' => $this->refreshToken->getExpiryDateTime()->getTimestamp(),
38+
'access_token_id' => $this->accessToken->getIdentifier(),
39+
'scopes' => $this->accessToken->getScopes(),
40+
'user_id' => $this->accessToken->getUserIdentifier(),
41+
'expire_time' => $this->refreshToken->getExpiryDateTime()->getTimestamp(),
4242
]);
4343

4444
if ($refreshTokenPayload === false) {

0 commit comments

Comments
 (0)