@@ -219,7 +219,7 @@ |
||
| 219 | 219 | self::SCOPE_APPROVAL_IS_SCOPE_MODIFIED => $isScopeModified, |
| 220 | 220 | self::SCOPE_APPROVAL_SCOPE => $scopeList, |
| 221 | 221 | self::SCOPE_APPROVAL_STATE => $state, |
| 222 | - ], function ($value) { |
|
| 222 | + ], function($value) { |
|
| 223 | 223 | return $value !== null; |
| 224 | 224 | }); |
| 225 | 225 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $tokenIdentifier = null; |
| 52 | 52 | if (empty($scopeIdentifiers = $code->getScopeIdentifiers()) === false) { |
| 53 | - $this->inTransaction(function () use ($values, $scopeIdentifiers, &$tokenIdentifier) { |
|
| 53 | + $this->inTransaction(function() use ($values, $scopeIdentifiers, &$tokenIdentifier) { |
|
| 54 | 54 | $tokenIdentifier = $this->createResource($values); |
| 55 | 55 | $this->bindScopeIdentifiers($tokenIdentifier, $scopeIdentifiers); |
| 56 | 56 | }); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | $tokenIdentifier = null; |
| 128 | 128 | if (empty($scopeIdentifiers = $token->getScopeIdentifiers()) === false) { |
| 129 | - $this->inTransaction(function () use ($values, $scopeIdentifiers, &$tokenIdentifier) { |
|
| 129 | + $this->inTransaction(function() use ($values, $scopeIdentifiers, &$tokenIdentifier) { |
|
| 130 | 130 | $tokenIdentifier = $this->createResource($values); |
| 131 | 131 | $this->bindScopeIdentifiers($tokenIdentifier, $scopeIdentifiers); |
| 132 | 132 | }); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | if (empty($scopeIdentifiers = $client->getScopeIdentifiers()) === true) { |
| 64 | 64 | $this->createResource($values); |
| 65 | 65 | } else { |
| 66 | - $this->inTransaction(function () use ($identifier, $values, $scopeIdentifiers) { |
|
| 66 | + $this->inTransaction(function() use ($identifier, $values, $scopeIdentifiers) { |
|
| 67 | 67 | $this->createResource($values); |
| 68 | 68 | $this->bindScopeIdentifiers($identifier, $scopeIdentifiers); |
| 69 | 69 | }); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | static::baseConfigureContainer($container); |
| 44 | 44 | |
| 45 | - $container[PassportServerIntegrationInterface::class] = function (PsrContainerInterface $container) { |
|
| 45 | + $container[PassportServerIntegrationInterface::class] = function(PsrContainerInterface $container) { |
|
| 46 | 46 | assert($container !== null); |
| 47 | 47 | |
| 48 | 48 | return new class ($container) extends GenericPassportServerIntegration |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | }; |
| 93 | 93 | }; |
| 94 | 94 | |
| 95 | - $container[TokenRepositoryInterface::class] = function (PsrContainerInterface $container) { |
|
| 95 | + $container[TokenRepositoryInterface::class] = function(PsrContainerInterface $container) { |
|
| 96 | 96 | $connection = $container->get(Connection::class); |
| 97 | 97 | $scheme = $container->get(DatabaseSchemeInterface::class); |
| 98 | 98 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public static function configureRoutes(GroupInterface $routes) |
| 40 | 40 | { |
| 41 | - $routes->group(static::GROUP_PREFIX, function (GroupInterface $group) { |
|
| 41 | + $routes->group(static::GROUP_PREFIX, function(GroupInterface $group) { |
|
| 42 | 42 | $group->get(static::AUTHORIZE_URI, PassportController::AUTHORIZE_HANDLER); |
| 43 | 43 | $group->post(static::TOKEN_URI, PassportController::TOKEN_HANDLER); |
| 44 | 44 | }); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | protected static function baseConfigureContainer(LimoncelloContainerInterface $container) |
| 44 | 44 | { |
| 45 | 45 | $accountManager = null; |
| 46 | - $factory = function (PsrContainerInterface $container) use (&$accountManager) { |
|
| 46 | + $factory = function(PsrContainerInterface $container) use (&$accountManager) { |
|
| 47 | 47 | if ($accountManager === null) { |
| 48 | 48 | $accountManager = new AccountManager($container); |
| 49 | 49 | } |
@@ -53,13 +53,13 @@ discard block |
||
| 53 | 53 | $container[AccountManagerInterface::class] = $factory; |
| 54 | 54 | $container[PassportAccountManagerInterface::class] = $factory; |
| 55 | 55 | |
| 56 | - $container[DatabaseSchemeInterface::class] = function (PsrContainerInterface $container) { |
|
| 56 | + $container[DatabaseSchemeInterface::class] = function(PsrContainerInterface $container) { |
|
| 57 | 57 | $settings = $container->get(SettingsProviderInterface::class)->get(C::class); |
| 58 | 58 | |
| 59 | 59 | return new DatabaseScheme($settings[C::KEY_USER_TABLE_NAME], $settings[C::KEY_USER_PRIMARY_KEY_NAME]); |
| 60 | 60 | }; |
| 61 | 61 | |
| 62 | - $container[PassportServerInterface::class] = function (PsrContainerInterface $container) { |
|
| 62 | + $container[PassportServerInterface::class] = function(PsrContainerInterface $container) { |
|
| 63 | 63 | $integration = $container->get(PassportServerIntegrationInterface::class); |
| 64 | 64 | $passportServer = new PassportServer($integration); |
| 65 | 65 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | static::baseConfigureContainer($container); |
| 44 | 44 | |
| 45 | - $container[PassportServerIntegrationInterface::class] = function (PsrContainerInterface $container) { |
|
| 45 | + $container[PassportServerIntegrationInterface::class] = function(PsrContainerInterface $container) { |
|
| 46 | 46 | assert($container !== null); |
| 47 | 47 | |
| 48 | 48 | return new class ($container) extends MySqlPassportServerIntegration |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | }; |
| 93 | 93 | }; |
| 94 | 94 | |
| 95 | - $container[TokenRepositoryInterface::class] = function (PsrContainerInterface $container) { |
|
| 95 | + $container[TokenRepositoryInterface::class] = function(PsrContainerInterface $container) { |
|
| 96 | 96 | $connection = $container->get(Connection::class); |
| 97 | 97 | $scheme = $container->get(DatabaseSchemeInterface::class); |
| 98 | 98 | |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | if ($data !== false) { |
| 112 | 112 | $scheme = $this->getDatabaseScheme(); |
| 113 | 113 | $tokenId = $data[$scheme->getTokensIdentityColumn()]; |
| 114 | - $scopes = $this->readScopeIdentifiers($tokenId); |
|
| 114 | + $scopes = $this->readScopeIdentifiers($tokenId); |
|
| 115 | 115 | $data[$scheme->getTokensViewScopesColumn()] = $scopes; |
| 116 | 116 | $result = $data; |
| 117 | 117 | } |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | |
| 361 | 361 | assert(is_string($defaultClientId) === true && empty($defaultClientId) === false); |
| 362 | 362 | |
| 363 | - $defaultClient = $this->getIntegration()->getClientRepository()->read($defaultClientId); |
|
| 363 | + $defaultClient = $this->getIntegration()->getClientRepository()->read($defaultClientId); |
|
| 364 | 364 | |
| 365 | 365 | assert($defaultClient !== null); |
| 366 | 366 | |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | $tokenRepo->updateValues($updatedToken); |
| 434 | 434 | } else { |
| 435 | 435 | assert(is_array($scope)); |
| 436 | - $tokenRepo->inTransaction(function () use ($tokenRepo, $updatedToken, $scope) { |
|
| 436 | + $tokenRepo->inTransaction(function() use ($tokenRepo, $updatedToken, $scope) { |
|
| 437 | 437 | $tokenRepo->updateValues($updatedToken); |
| 438 | 438 | $tokenRepo->unbindScopes($updatedToken->getIdentifier()); |
| 439 | 439 | $tokenRepo->bindScopeIdentifiers($updatedToken->getIdentifier(), $scope); |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | { |
| 486 | 486 | $this->logDebug('Sending token as JSON response.'); |
| 487 | 487 | |
| 488 | - $scopeList = $token->isScopeModified() === false || empty($token->getScopeIdentifiers()) === true ? |
|
| 488 | + $scopeList = $token->isScopeModified() === false || empty($token->getScopeIdentifiers()) === true ? |
|
| 489 | 489 | null : $token->getScopeList(); |
| 490 | 490 | |
| 491 | 491 | // for access token format @link https://tools.ietf.org/html/rfc6749#section-5.1 |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | ): ResponseInterface { |
| 544 | 544 | $this->logDebug('Sending token as redirect response.'); |
| 545 | 545 | |
| 546 | - $scopeList = $token->isScopeModified() === false || empty($token->getScopeIdentifiers()) === true ? |
|
| 546 | + $scopeList = $token->isScopeModified() === false || empty($token->getScopeIdentifiers()) === true ? |
|
| 547 | 547 | null : $token->getScopeList(); |
| 548 | 548 | |
| 549 | 549 | // for access token format @link https://tools.ietf.org/html/rfc6749#section-5.1 |
@@ -686,7 +686,7 @@ discard block |
||
| 686 | 686 | */ |
| 687 | 687 | private function filterNulls(array $array): array |
| 688 | 688 | { |
| 689 | - return array_filter($array, function ($value) { |
|
| 689 | + return array_filter($array, function($value) { |
|
| 690 | 690 | return $value !== null; |
| 691 | 691 | }); |
| 692 | 692 | } |