Passed
Branch master (494dbe)
by Raffael
03:31
created
src/AttributeMap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 
83 83
                 switch ($value['type']) {
84 84
                     case 'array':
85
-                        $arr =  (array)$data[$value['attr']];
85
+                        $arr = (array)$data[$value['attr']];
86 86
                         unset($arr['count']);
87 87
                         $attrs[$attr] = $arr;
88 88
                     break;
Please login to merge, or discard this patch.
src/Adapter/Oidc.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param   Iterable $config
70 70
      * @return  void
71 71
      */
72
-    public function __construct(LoggerInterface $logger, ?Iterable $config=null)
72
+    public function __construct(LoggerInterface $logger, ?Iterable $config = null)
73 73
     {
74 74
         $this->logger = $logger;
75 75
         $this->setOptions($config);
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
             return $this;
89 89
         }
90 90
 
91
-        foreach($config as $option => $value) {
92
-            switch($option) {
91
+        foreach ($config as $option => $value) {
92
+            switch ($option) {
93 93
                 case 'provider_url':
94 94
                 case 'token_validation_url':
95 95
                 case 'identity_attribute':
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
172 172
             curl_close($ch);
173 173
 
174
-            if($code === 200) {
174
+            if ($code === 200) {
175 175
                 $discovery = json_decode($result, true);
176 176
                 $this->logger->debug('received openid-connect discovery document from ['.$url.']', [
177 177
                     'category' => get_class($this),
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     protected function verifyToken(string $token): bool
204 204
     {
205
-        if($this->token_validation_url) {
205
+        if ($this->token_validation_url) {
206 206
             $this->logger->debug('validate oauth2 token via rfc7662 token validation endpoint ['.$this->token_validation_url.']', [
207 207
                'category' => get_class($this),
208 208
             ]);
@@ -229,19 +229,19 @@  discard block
 block discarded – undo
229 229
         curl_close($ch);
230 230
         $response = json_decode($result, true);
231 231
 
232
-        if($code === 200) {
232
+        if ($code === 200) {
233 233
             $attributes = json_decode($result, true);
234 234
             $this->logger->debug('successfully verified oauth2 access token via authorization server', [
235 235
                'category' => get_class($this),
236 236
             ]);
237 237
 
238
-            if(!isset($attributes[$this->identity_attribute])) {
238
+            if (!isset($attributes[$this->identity_attribute])) {
239 239
                 throw new Exception('identity attribute '.$this->identity_attribute.' not found in oauth2 response');
240 240
             }
241 241
 
242 242
             $this->identifier = $attributes['preferred_username'];
243 243
 
244
-            if($this->token_validation_url) {
244
+            if ($this->token_validation_url) {
245 245
                 $this->attributes = $attributes;
246 246
             } else {
247 247
                 $this->access_token = $token;
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      */
266 266
     public function getAttributes(): array
267 267
     {
268
-        if(count($this->attributes) !== 0) {
268
+        if (count($this->attributes) !== 0) {
269 269
             return $this->attributes;
270 270
         }
271 271
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         curl_close($ch);
288 288
         $response = json_decode($result, true);
289 289
 
290
-        if($code === 200) {
290
+        if ($code === 200) {
291 291
             $attributes = json_decode($result, true);
292 292
             $this->logger->debug('successfully requested user attributes from userinfo_endpoint', [
293 293
                'category' => get_class($this),
Please login to merge, or discard this patch.
src/Adapter/Basic/Ldap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     protected $account_filter = '(uid=%s)';
44 44
 
45 45
 
46
-    public function __construct(LdapServer $ldap, LoggerInterface $logger, ?Iterable $config=null)
46
+    public function __construct(LdapServer $ldap, LoggerInterface $logger, ?Iterable $config = null)
47 47
     {
48 48
         $this->logger = $logger;
49 49
         $this->ldap = $ldap;
Please login to merge, or discard this patch.
src/Ldap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
      * @param   Logger $logger
88 88
      * @return  resource
89 89
      */
90
-    public function __construct(LoggerInterface $logger, ?Iterable $config=null)
90
+    public function __construct(LoggerInterface $logger, ?Iterable $config = null)
91 91
     {
92 92
         $this->setOptions($config);
93 93
         $this->logger = $logger;
Please login to merge, or discard this patch.
src/Auth.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                     $this->{$option} = (string)$value;
94 94
                 break;
95 95
                 case 'adapter':
96
-                    foreach($value as $name => $adapter) {
96
+                    foreach ($value as $name => $adapter) {
97 97
                         $this->injectAdapter($name, $adapter);
98 98
                     }
99 99
                 break;
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
     /**
128 128
      * {@inheritDoc}
129 129
      */
130
-    public function injectAdapter($adapter, ?string $name=null) : AdapterAwareInterface
130
+    public function injectAdapter($adapter, ?string $name = null) : AdapterAwareInterface
131 131
     {
132
-        if(!($adapter instanceof AdapterInterface)) {
132
+        if (!($adapter instanceof AdapterInterface)) {
133 133
             throw new Exception('adapter needs to implement AdapterInterface');
134 134
         }
135 135
 
136
-        if($name === null) {
136
+        if ($name === null) {
137 137
             $name = get_class($adapter);
138 138
         }
139 139
 
Please login to merge, or discard this patch.