Passed
Push — master ( 4ed5da...df57b2 )
by Thomas Mauro
01:56
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/AuthMethod/PrivateKeyJwtAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
         $jwk = $client->getJWKS()->selectKey('sig', null, $this->kid ? ['kid' => $this->kid] : []);
62 62
 
63
-        if (! $jwk) {
63
+        if (!$jwk) {
64 64
             throw new RuntimeException('Unable to get a client signature jwk');
65 65
         }
66 66
 
Please login to merge, or discard this patch.
src/JWT/JWSLoader.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
         $claims = \json_decode($jws->getPayload(), true);
47 47
 
48
-        if (! \is_array($claims)) {
48
+        if (!\is_array($claims)) {
49 49
             throw new RuntimeException('Unable to decode claims');
50 50
         }
51 51
 
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
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $data = \json_decode($response->getBody()->getContents(), true);
29 29
 
30
-        if (! \is_array($data) || ! isset($data['error'])) {
30
+        if (!\is_array($data) || !isset($data['error'])) {
31 31
             throw new RemoteException($response, $response->getReasonPhrase(), $response->getStatusCode(), $previous);
32 32
         }
33 33
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public static function fromParameters(array $params, Throwable $previous = null): self
43 43
     {
44
-        if (! \array_key_exists('error', $params)) {
44
+        if (!\array_key_exists('error', $params)) {
45 45
             throw new RuntimeException('Invalid OAuth2 exception', 0, $previous);
46 46
         }
47 47
 
Please login to merge, or discard this patch.
src/Provider/DiscoveryMetadataProvider.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
         $data = parseMetadataResponse($response, 200);
41 41
 
42
-        if (! \array_key_exists('issuer', $data)) {
42
+        if (!\array_key_exists('issuer', $data)) {
43 43
             throw new RuntimeException('Invalid metadata content, no "issuer" key found');
44 44
         }
45 45
 
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
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $endpointUri = $client->getUserinfoEndpoint();
47 47
 
48
-        if (! $endpointUri) {
48
+        if (!$endpointUri) {
49 49
             throw new InvalidArgumentException('Invalid issuer userinfo endpoint');
50 50
         }
51 51
 
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
             $payload = $response->getBody()->getContents();
76 76
         }
77 77
 
78
-        if (! \is_string($payload)) {
78
+        if (!\is_string($payload)) {
79 79
             throw new RuntimeException('Unable to parse userinfo claims');
80 80
         }
81 81
 
82 82
         $claims = \json_decode($payload, true);
83 83
 
84
-        if (! \is_array($claims)) {
84
+        if (!\is_array($claims)) {
85 85
             throw new RuntimeException('Unable to parse userinfo claims');
86 86
         }
87 87
 
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
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $registrationEndpoint = $issuer->getMetadata()->getRegistrationEndpoint();
59 59
 
60
-        if (! $registrationEndpoint) {
60
+        if (!$registrationEndpoint) {
61 61
             throw new InvalidArgumentException('Issuer does not support dynamic client registration');
62 62
         }
63 63
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $data = parseMetadataResponse($response, 201);
86 86
 
87
-        if (! \array_key_exists('client_id', $data)) {
87
+        if (!\array_key_exists('client_id', $data)) {
88 88
             throw new RuntimeException('Registration response did not return a client_id field');
89 89
         }
90 90
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         $claims = parseMetadataResponse($response, 200);
107 107
 
108
-        if (! \array_key_exists('client_id', $claims)) {
108
+        if (!\array_key_exists('client_id', $claims)) {
109 109
             throw new RuntimeException('Registration response did not return a client_id field');
110 110
         }
111 111
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
         $data = parseMetadataResponse($response, 200);
145 145
 
146
-        if (! \array_key_exists('client_id', $data)) {
146
+        if (!\array_key_exists('client_id', $data)) {
147 147
             throw new RuntimeException('Registration response did not return a client_id field');
148 148
         }
149 149
 
Please login to merge, or discard this patch.
src/Authorization/TokenResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.