Passed
Push — master ( f18c04...fb67eb )
by Thomas Mauro
02:46
created
src/AuthMethod/ClientSecretPost.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/AuthMethod/AuthMethodFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/AuthMethod/ClientSecretBasic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Model/IssuerMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -572,7 +572,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Model/ClientMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -572,7 +572,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Middleware/AuthRedirectHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/functions/parse_metadata_response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Exception/OAuth2Exception.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.