@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $clientId = $client->getMetadata()->getClientId(); |
| 38 | 38 | $clientSecret = $client->getMetadata()->getClientSecret(); |
| 39 | 39 | |
| 40 | - if (! $clientSecret) { |
|
| 40 | + if (!$clientSecret) { |
|
| 41 | 41 | throw new InvalidArgumentException($this->getSupportedMethod() . ' cannot be used without client_secret metadata'); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $clientId = $client->getMetadata()->getClientId(); |
| 38 | 38 | $clientSecret = $client->getMetadata()->getClientSecret(); |
| 39 | 39 | |
| 40 | - if (! $clientSecret) { |
|
| 40 | + if (!$clientSecret) { |
|
| 41 | 41 | throw new InvalidArgumentException($this->getSupportedMethod() . ' cannot be used without client_secret metadata'); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -147,7 +147,7 @@ |
||
| 147 | 147 | 'code_verifier' => $this->codeVerifier, |
| 148 | 148 | ]; |
| 149 | 149 | |
| 150 | - return \array_filter($data, static function ($value) { |
|
| 150 | + return \array_filter($data, static function($value) { |
|
| 151 | 151 | return null !== $value; |
| 152 | 152 | }); |
| 153 | 153 | } |
@@ -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 | |
@@ -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); |