Passed
Push — master ( caf7da...d55627 )
by Thomas Mauro
03:42
created
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/Middleware/TokenRequestMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,17 +50,17 @@
 block discarded – undo
50 50
         $authResponse = $request->getAttribute(AuthResponseInterface::class);
51 51
         $client = $this->client ?: $request->getAttribute(ClientInterface::class);
52 52
 
53
-        if (! $client instanceof ClientInterface) {
53
+        if (!$client instanceof ClientInterface) {
54 54
             throw new LogicException('No OpenID client provided');
55 55
         }
56 56
 
57
-        if (! $authResponse instanceof AuthResponseInterface) {
57
+        if (!$authResponse instanceof AuthResponseInterface) {
58 58
             throw new RuntimeException('Unable to get auth token response attribute');
59 59
         }
60 60
 
61 61
         $code = $authResponse->getCode();
62 62
 
63
-        if (! $code) {
63
+        if (!$code) {
64 64
             throw new RuntimeException('Unable to get auth code');
65 65
         }
66 66
 
Please login to merge, or discard this patch.
src/Middleware/AuthTokenResponseMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $client = $this->client ?: $request->getAttribute(ClientInterface::class);
45 45
 
46
-        if (! $client instanceof ClientInterface) {
46
+        if (!$client instanceof ClientInterface) {
47 47
             throw new LogicException('No OpenID client provided');
48 48
         }
49 49
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
         $code = $claims['code'] ?? null;
62 62
 
63
-        if (! $code) {
63
+        if (!$code) {
64 64
             throw new RuntimeException('Unable to find a code claim to make a token request');
65 65
         }
66 66
 
Please login to merge, or discard this patch.
src/Middleware/UserInfoMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,17 +43,17 @@
 block discarded – undo
43 43
         $tokenResponse = $request->getAttribute(TokenResponseInterface::class);
44 44
         $client = $this->client ?: $request->getAttribute(ClientInterface::class);
45 45
 
46
-        if (! $client instanceof ClientInterface) {
46
+        if (!$client instanceof ClientInterface) {
47 47
             throw new LogicException('No OpenID client provided');
48 48
         }
49 49
 
50
-        if (! $tokenResponse instanceof TokenResponseInterface) {
50
+        if (!$tokenResponse instanceof TokenResponseInterface) {
51 51
             throw new RuntimeException('Unable to get token response attribute');
52 52
         }
53 53
 
54 54
         $accessToken = $tokenResponse->getAccessToken();
55 55
 
56
-        if (! $accessToken) {
56
+        if (!$accessToken) {
57 57
             throw new RuntimeException(\sprintf(
58 58
                 'Unable to get access token from "%s" attribute',
59 59
                 TokenResponseInterface::class
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/ResponseMode/FormPost.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
         $data = \json_decode((string) $request->getBody(), true);
21 21
 
22
-        if (! \is_array($data)) {
22
+        if (!\is_array($data)) {
23 23
             throw new RuntimeException('Unable to decode response body');
24 24
         }
25 25
 
Please login to merge, or discard this patch.
src/Service/UserinfoService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $endpointUri = $client->getUserinfoEndpoint();
49 49
 
50
-        if (! $endpointUri) {
50
+        if (!$endpointUri) {
51 51
             throw new InvalidArgumentException('Invalid issuer userinfo endpoint');
52 52
         }
53 53
 
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
             $payload = (string) $response->getBody();
78 78
         }
79 79
 
80
-        if (! \is_string($payload)) {
80
+        if (!\is_string($payload)) {
81 81
             throw new RuntimeException('Unable to parse userinfo claims');
82 82
         }
83 83
 
84 84
         $claims = \json_decode($payload, true);
85 85
 
86
-        if (! \is_array($claims)) {
86
+        if (!\is_array($claims)) {
87 87
             throw new RuntimeException('Unable to parse userinfo claims');
88 88
         }
89 89
 
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.