@@ -572,7 +572,7 @@ |
||
| 572 | 572 | */ |
| 573 | 573 | private function getFilteredClaims(): array |
| 574 | 574 | { |
| 575 | - return \array_filter($this->claims, static function ($value, string $key) { |
|
| 575 | + return \array_filter($this->claims, static function($value, string $key) { |
|
| 576 | 576 | return \array_key_exists($key, static::$requiredKeys) |
| 577 | 577 | || $value !== (static::$defaults[$key] ?? null); |
| 578 | 578 | }, \ARRAY_FILTER_USE_BOTH); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | /** @var string|null $token */ |
| 43 | 43 | $token = $baseParams['response'] ?? null; |
| 44 | 44 | |
| 45 | - if (! $token) { |
|
| 45 | + if (!$token) { |
|
| 46 | 46 | throw new InvalidArgumentException('Invalid authorization request from provider, no "response" parameter'); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | $params = \json_decode($jws->getPayload(), true); |
| 56 | 56 | |
| 57 | - if (! \is_array($params)) { |
|
| 57 | + if (!\is_array($params)) { |
|
| 58 | 58 | throw new RuntimeException('Invalid JWT payload'); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | |
| 46 | 46 | $isJwt = \array_key_exists('response', $params); |
| 47 | 47 | |
| 48 | - if (! $isJwt) { |
|
| 48 | + if (!$isJwt) { |
|
| 49 | 49 | return $baseMethod; |
| 50 | 50 | } |
| 51 | 51 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | ): array { |
| 60 | 60 | $registrationEndpoint = $issuer->getMetadata()->getRegistrationEndpoint(); |
| 61 | 61 | |
| 62 | - if (! $registrationEndpoint) { |
|
| 62 | + if (!$registrationEndpoint) { |
|
| 63 | 63 | throw new InvalidArgumentException('Issuer does not support dynamic client registration'); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | $data = parseMetadataResponse($response, 201); |
| 88 | 88 | |
| 89 | - if (! \array_key_exists('client_id', $data)) { |
|
| 89 | + if (!\array_key_exists('client_id', $data)) { |
|
| 90 | 90 | throw new RuntimeException('Registration response did not return a client_id field'); |
| 91 | 91 | } |
| 92 | 92 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | $claims = parseMetadataResponse($response, 200); |
| 109 | 109 | |
| 110 | - if (! \array_key_exists('client_id', $claims)) { |
|
| 110 | + if (!\array_key_exists('client_id', $claims)) { |
|
| 111 | 111 | throw new RuntimeException('Registration response did not return a client_id field'); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | $data = parseMetadataResponse($response, 200); |
| 146 | 146 | |
| 147 | - if (! \array_key_exists('client_id', $data)) { |
|
| 147 | + if (!\array_key_exists('client_id', $data)) { |
|
| 148 | 148 | throw new RuntimeException('Registration response did not return a client_id field'); |
| 149 | 149 | } |
| 150 | 150 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | /** @var bool|array<string, mixed> $data */ |
| 21 | 21 | $data = \json_decode($response->getBody()->getContents(), true); |
| 22 | 22 | |
| 23 | - if (! \is_array($data)) { |
|
| 23 | + if (!\is_array($data)) { |
|
| 24 | 24 | throw new InvalidArgumentException('Invalid metadata content'); |
| 25 | 25 | } |
| 26 | 26 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | function checkServerResponse(ResponseInterface $response, ?int $expectedCode = null): void |
| 15 | 15 | { |
| 16 | - if (! $expectedCode && $response->getStatusCode() >= 400) { |
|
| 16 | + if (!$expectedCode && $response->getStatusCode() >= 400) { |
|
| 17 | 17 | throw OAuth2Exception::fromResponse($response); |
| 18 | 18 | } |
| 19 | 19 | |
@@ -572,7 +572,7 @@ |
||
| 572 | 572 | */ |
| 573 | 573 | private function getFilteredClaims(): array |
| 574 | 574 | { |
| 575 | - return \array_filter($this->claims, static function ($value, string $key) { |
|
| 575 | + return \array_filter($this->claims, static function($value, string $key) { |
|
| 576 | 576 | return \array_key_exists($key, static::$requiredKeys) |
| 577 | 577 | || $value !== (static::$defaults[$key] ?? null); |
| 578 | 578 | }, \ARRAY_FILTER_USE_BOTH); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | |
| 61 | 61 | $jwk = $client->getJWKS()->selectKey('sig', null, $this->kid ? ['kid' => $this->kid] : []); |
| 62 | 62 | |
| 63 | - if (! $jwk) { |
|
| 63 | + if (!$jwk) { |
|
| 64 | 64 | throw new RuntimeException('Unable to get a client signature jwk'); |
| 65 | 65 | } |
| 66 | 66 | |