Passed
Push — master ( df57b2...ae18ca )
by Thomas Mauro
02:04
created
src/Middleware/UserInfoMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,13 +41,13 @@
 block discarded – undo
41 41
     {
42 42
         $tokenResponse = $request->getAttribute(TokenResponseInterface::class);
43 43
 
44
-        if (! $tokenResponse instanceof TokenResponseInterface) {
44
+        if (!$tokenResponse instanceof TokenResponseInterface) {
45 45
             throw new RuntimeException('Unable to get token response attribute');
46 46
         }
47 47
 
48 48
         $accessToken = $tokenResponse->getAccessToken();
49 49
 
50
-        if (! $accessToken) {
50
+        if (!$accessToken) {
51 51
             throw new RuntimeException(\sprintf(
52 52
                 'Unable to get access token from "%s" attribute',
53 53
                 TokenResponseInterface::class
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
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
      */
142 142
     private function getFilteredClaims(): array
143 143
     {
144
-        return \array_filter($this->claims, static function ($value, string $key) {
144
+        return \array_filter($this->claims, static function($value, string $key) {
145 145
             return \array_key_exists($key, static::$requiredKeys)
146 146
                 || $value !== (static::$defaults[$key] ?? null);
147 147
         }, \ARRAY_FILTER_USE_BOTH);
Please login to merge, or discard this patch.
src/ResponseMode/AbstractJwt.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ResponseMode/ResponseModeProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Service/ClientRegistration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
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($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
 
Please login to merge, or discard this patch.
src/functions/check_server_response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.