@@ -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 | }); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public static function configureRoutes(GroupInterface $routes): void |
| 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 | }); |
@@ -38,13 +38,13 @@ |
||
| 38 | 38 | { |
| 39 | 39 | static::baseConfigureContainer($container); |
| 40 | 40 | |
| 41 | - $container[PassportServerIntegrationInterface::class] = function ( |
|
| 41 | + $container[PassportServerIntegrationInterface::class] = function( |
|
| 42 | 42 | PsrContainerInterface $container |
| 43 | 43 | ): PassportServerIntegrationInterface { |
| 44 | 44 | return new PassportServerIntegration($container); |
| 45 | 45 | }; |
| 46 | 46 | |
| 47 | - $container[TokenRepositoryInterface::class] = function ( |
|
| 47 | + $container[TokenRepositoryInterface::class] = function( |
|
| 48 | 48 | PsrContainerInterface $container |
| 49 | 49 | ): TokenRepositoryInterface { |
| 50 | 50 | $connection = $container->get(Connection::class); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $statement = $query |
| 163 | 163 | ->select($columns) |
| 164 | 164 | ->from($this->getTableNameForReading()) |
| 165 | - ->where($column . '=' . $this->createTypedParameter($query, $identifier)) |
|
| 165 | + ->where($column.'='.$this->createTypedParameter($query, $identifier)) |
|
| 166 | 166 | ->execute(); |
| 167 | 167 | |
| 168 | 168 | $statement->setFetchMode(PDO::FETCH_CLASS, $this->getClassName()); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | |
| 184 | 184 | $query |
| 185 | 185 | ->update($this->getTableNameForWriting()) |
| 186 | - ->where($this->getPrimaryKeyName() . '=' . $this->createTypedParameter($query, $identifier)); |
|
| 186 | + ->where($this->getPrimaryKeyName().'='.$this->createTypedParameter($query, $identifier)); |
|
| 187 | 187 | foreach ($values as $key => $value) { |
| 188 | 188 | $query->set($key, $this->createTypedParameter($query, $value)); |
| 189 | 189 | } |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | $query |
| 207 | 207 | ->delete($this->getTableNameForWriting()) |
| 208 | - ->where($this->getPrimaryKeyName() . '=' . $this->createTypedParameter($query, $identifier)); |
|
| 208 | + ->where($this->getPrimaryKeyName().'='.$this->createTypedParameter($query, $identifier)); |
|
| 209 | 209 | |
| 210 | 210 | $numberOfDeleted = $query->execute(); |
| 211 | 211 | assert(is_int($numberOfDeleted) === true); |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $query |
| 263 | 263 | ->select($intForeignKeyName) |
| 264 | 264 | ->from($intTableName) |
| 265 | - ->where($intPrimaryKeyName . '=' . $this->createTypedParameter($query, $identifier)); |
|
| 265 | + ->where($intPrimaryKeyName.'='.$this->createTypedParameter($query, $identifier)); |
|
| 266 | 266 | |
| 267 | 267 | $statement = $query->execute(); |
| 268 | 268 | $statement->setFetchMode(PDO::FETCH_NUM); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $query |
| 292 | 292 | ->select($hasManyColumn) |
| 293 | 293 | ->from($hasManyTableName) |
| 294 | - ->where($hasManyFkName . '=' . $this->createTypedParameter($query, $identifier)); |
|
| 294 | + ->where($hasManyFkName.'='.$this->createTypedParameter($query, $identifier)); |
|
| 295 | 295 | |
| 296 | 296 | $statement = $query->execute(); |
| 297 | 297 | $statement->setFetchMode(PDO::FETCH_NUM); |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | |
| 318 | 318 | $query |
| 319 | 319 | ->delete($intTableName) |
| 320 | - ->where($intPrimaryKeyName . '=' . $this->createTypedParameter($query, $identifier)); |
|
| 320 | + ->where($intPrimaryKeyName.'='.$this->createTypedParameter($query, $identifier)); |
|
| 321 | 321 | |
| 322 | 322 | $numberOfDeleted = $query->execute(); |
| 323 | 323 | assert(is_int($numberOfDeleted) === true); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $statement = $query |
| 38 | 38 | ->select(['*']) |
| 39 | 39 | ->from($this->getTableNameForWriting()) |
| 40 | - ->where($clientIdColumn . '=' . $this->createTypedParameter($query, $clientIdentifier)) |
|
| 40 | + ->where($clientIdColumn.'='.$this->createTypedParameter($query, $clientIdentifier)) |
|
| 41 | 41 | ->execute(); |
| 42 | 42 | |
| 43 | 43 | $statement->setFetchMode(PDO::FETCH_CLASS, $this->getClassName()); |
@@ -38,13 +38,13 @@ |
||
| 38 | 38 | { |
| 39 | 39 | static::baseConfigureContainer($container); |
| 40 | 40 | |
| 41 | - $container[PassportServerIntegrationInterface::class] = function ( |
|
| 41 | + $container[PassportServerIntegrationInterface::class] = function( |
|
| 42 | 42 | PsrContainerInterface $container |
| 43 | 43 | ): PassportServerIntegrationInterface { |
| 44 | 44 | return new PassportServerIntegration($container); |
| 45 | 45 | }; |
| 46 | 46 | |
| 47 | - $container[TokenRepositoryInterface::class] = function ( |
|
| 47 | + $container[TokenRepositoryInterface::class] = function( |
|
| 48 | 48 | PsrContainerInterface $container |
| 49 | 49 | ): TokenRepositoryInterface { |
| 50 | 50 | $connection = $container->get(Connection::class); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | // try to parse `Authorization` header for client ID and credentials |
| 58 | 58 | $clientId = null; |
| 59 | 59 | $clientCredentials = null; |
| 60 | - $errorHeaders = ['WWW-Authenticate' => 'Basic realm="' . $realm . '"']; |
|
| 60 | + $errorHeaders = ['WWW-Authenticate' => 'Basic realm="'.$realm.'"']; |
|
| 61 | 61 | if (empty($headerArray = $authorizationHeader) === false) { |
| 62 | 62 | $errorCode = OAuthTokenBodyException::ERROR_INVALID_CLIENT; |
| 63 | 63 | if (empty($authHeader = $headerArray[0]) === true || |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | { |
| 64 | 64 | if ($this->hasDynamicProperty(static::FIELD_ID) === true) { |
| 65 | 65 | $this |
| 66 | - ->setIdentifier((int)$this->{static::FIELD_ID}) |
|
| 66 | + ->setIdentifier((int) $this->{static::FIELD_ID}) |
|
| 67 | 67 | ->setClientIdentifier($this->{static::FIELD_ID_CLIENT}) |
| 68 | 68 | ->setValue($this->{static::FIELD_VALUE}); |
| 69 | 69 | } |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | |
| 369 | 369 | assert(is_string($defaultClientId) === true && empty($defaultClientId) === false); |
| 370 | 370 | |
| 371 | - $defaultClient = $this->readClientByIdentifier($defaultClientId); |
|
| 371 | + $defaultClient = $this->readClientByIdentifier($defaultClientId); |
|
| 372 | 372 | |
| 373 | 373 | assert($defaultClient !== null); |
| 374 | 374 | |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | $tokenRepo->updateValues($updatedToken); |
| 442 | 442 | } else { |
| 443 | 443 | assert(is_array($scope)); |
| 444 | - $tokenRepo->inTransaction(function () use ($tokenRepo, $updatedToken, $scope) { |
|
| 444 | + $tokenRepo->inTransaction(function() use ($tokenRepo, $updatedToken, $scope) { |
|
| 445 | 445 | $tokenRepo->updateValues($updatedToken); |
| 446 | 446 | $tokenRepo->unbindScopes($updatedToken->getIdentifier()); |
| 447 | 447 | $tokenRepo->bindScopeIdentifiers($updatedToken->getIdentifier(), $scope); |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | { |
| 502 | 502 | $this->logDebug('Sending token as JSON response.'); |
| 503 | 503 | |
| 504 | - $scopeList = $token->isScopeModified() === false || empty($token->getScopeIdentifiers()) === true ? |
|
| 504 | + $scopeList = $token->isScopeModified() === false || empty($token->getScopeIdentifiers()) === true ? |
|
| 505 | 505 | null : $token->getScopeList(); |
| 506 | 506 | |
| 507 | 507 | // for access token format @link https://tools.ietf.org/html/rfc6749#section-5.1 |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | ): ResponseInterface { |
| 566 | 566 | $this->logDebug('Sending token as redirect response.'); |
| 567 | 567 | |
| 568 | - $scopeList = $token->isScopeModified() === false || empty($token->getScopeIdentifiers()) === true ? |
|
| 568 | + $scopeList = $token->isScopeModified() === false || empty($token->getScopeIdentifiers()) === true ? |
|
| 569 | 569 | null : $token->getScopeList(); |
| 570 | 570 | |
| 571 | 571 | // for access token format @link https://tools.ietf.org/html/rfc6749#section-5.1 |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | */ |
| 722 | 722 | private function filterNulls(array $array): array |
| 723 | 723 | { |
| 724 | - return array_filter($array, function ($value) { |
|
| 724 | + return array_filter($array, function($value) { |
|
| 725 | 725 | return $value !== null; |
| 726 | 726 | }); |
| 727 | 727 | } |