@@ -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 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | $method = $this->methods[$authMethod] ?? null; |
41 | 41 | |
42 | - if (! $method) { |
|
42 | + if (!$method) { |
|
43 | 43 | throw new RuntimeException('Unsupported auth method "' . $authMethod . '"'); |
44 | 44 | } |
45 | 45 |
@@ -116,11 +116,11 @@ discard block |
||
116 | 116 | /** @var string|null $endpointUri */ |
117 | 117 | $endpointUri = $this->getIssuer()->getMetadata()->get($endpointClaim); |
118 | 118 | |
119 | - if (! $endpointUri) { |
|
119 | + if (!$endpointUri) { |
|
120 | 120 | return null; |
121 | 121 | } |
122 | 122 | |
123 | - if (! \in_array($authMethod, AuthMethodInterface::TLS_METHODS, true)) { |
|
123 | + if (!\in_array($authMethod, AuthMethodInterface::TLS_METHODS, true)) { |
|
124 | 124 | return $endpointUri; |
125 | 125 | } |
126 | 126 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | { |
134 | 134 | $uri = $this->getEndpointUri('token_endpoint'); |
135 | 135 | |
136 | - if (! $uri) { |
|
136 | + if (!$uri) { |
|
137 | 137 | throw new RuntimeException('Unable to retrieve the token endpoint'); |
138 | 138 | } |
139 | 139 |
@@ -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 |
@@ -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); |
@@ -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); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | { |
42 | 42 | $authRequest = $request->getAttribute(AuthRequestInterface::class); |
43 | 43 | |
44 | - if (! $authRequest instanceof AuthRequestInterface) { |
|
44 | + if (!$authRequest instanceof AuthRequestInterface) { |
|
45 | 45 | throw new RuntimeException('Unable to find a valid attribute for ' . AuthRequestInterface::class); |
46 | 46 | } |
47 | 47 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | $client = $this->client ?: $request->getAttribute(ClientInterface::class); |
65 | 65 | |
66 | - if (! $client instanceof ClientInterface) { |
|
66 | + if (!$client instanceof ClientInterface) { |
|
67 | 67 | throw new LogicException('No OpenID client provided'); |
68 | 68 | } |
69 | 69 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | /** @var bool|array<string, mixed> $data */ |
21 | 21 | $data = \json_decode((string) $response->getBody(), 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 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | { |
32 | 32 | $data = \json_decode((string) $response->getBody(), true); |
33 | 33 | |
34 | - if (! \is_array($data) || ! isset($data['error'])) { |
|
34 | + if (!\is_array($data) || !isset($data['error'])) { |
|
35 | 35 | throw new RemoteException($response, $response->getReasonPhrase(), $response->getStatusCode(), $previous); |
36 | 36 | } |
37 | 37 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public static function fromParameters(array $params, Throwable $previous = null): self |
48 | 48 | { |
49 | - if (! \array_key_exists('error', $params)) { |
|
49 | + if (!\array_key_exists('error', $params)) { |
|
50 | 50 | throw new RuntimeException('Invalid OAuth2 exception', 0, $previous); |
51 | 51 | } |
52 | 52 |