Completed
Push — master ( fe1a09...0c1faf )
by Raffael
01:39
created
src/Config/Xml.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
             if (count($simplexml_child->children()) === 0) {
108 108
                 if (!isset($simplexml_to->{$simplexml_child->getName()})) {
109 109
                     $simplexml_to->addChild($simplexml_child->getName(), htmlspecialchars((string)$simplexml_child));
110
-                } elseif($replace === true && count($simplexml_to->{$simplexml_child->getName()}->children()) === 0) {
110
+                } elseif ($replace === true && count($simplexml_to->{$simplexml_child->getName()}->children()) === 0) {
111 111
                     $simplexml_to->{$simplexml_child->getName()} = htmlspecialchars((string)$simplexml_child);
112 112
                 }
113 113
             } else {
Please login to merge, or discard this patch.
src/Auth/Adapter/Basic/AbstractBasic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
      * @param  string $username
111 111
      * @return array
112 112
      */
113
-    protected abstract function findIdentity(string $username): ?array;
113
+    protected abstract function findIdentity(string $username): ? array;
114 114
 
115 115
 
116 116
     /**
Please login to merge, or discard this patch.
src/Auth/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/Auth/Adapter/Oidc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
             return $this;
75 75
         }
76 76
 
77
-        foreach($config as $option => $value) {
78
-            switch($option) {
77
+        foreach ($config as $option => $value) {
78
+            switch ($option) {
79 79
                 case 'provider_url':
80 80
                 case 'token_validation_url':
81 81
                 case 'identity_attribute':
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
157 157
             curl_close($ch);
158 158
 
159
-            if($code === 200) {
159
+            if ($code === 200) {
160 160
                 $discovery = json_decode($result, true);
161 161
                 $this->logger->debug('received openid-connect discovery document from ['.$url.']', [
162 162
                     'category' => get_class($this),
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      */
188 188
     protected function verifyToken(string $token): bool
189 189
     {
190
-        if($this->token_validation_url) {
190
+        if ($this->token_validation_url) {
191 191
             $this->logger->debug('validate oauth2 token via rfc7662 token validation endpoint ['.$this->token_validation_url.']', [
192 192
                'category' => get_class($this),
193 193
             ]);
@@ -214,19 +214,19 @@  discard block
 block discarded – undo
214 214
         curl_close($ch);
215 215
         $response = json_decode($result, true);
216 216
         
217
-        if($code === 200) {
217
+        if ($code === 200) {
218 218
             $attributes = json_decode($result, true);
219 219
             $this->logger->debug('successfully verified oauth2 access token via authorization server', [
220 220
                'category' => get_class($this),
221 221
             ]);
222 222
         
223
-            if(!isset($attributes[$this->identity_attribute])) {
223
+            if (!isset($attributes[$this->identity_attribute])) {
224 224
                 throw new Exception('identity attribute '.$this->identity_attribute.' not found in oauth2 response');
225 225
             }
226 226
 
227 227
             $this->identifier = $attributes['preferred_username'];
228 228
         
229
-            if($this->token_validation_url) {
229
+            if ($this->token_validation_url) {
230 230
                 $this->attributes = $attributes;    
231 231
             } else {
232 232
                 $this->access_token = $token;
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      */
251 251
     public function getAttributes(): array
252 252
     {
253
-        if(count($this->attributes) !== 0) {
253
+        if (count($this->attributes) !== 0) {
254 254
             return $this->attributes;
255 255
         }
256 256
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         curl_close($ch);
273 273
         $response = json_decode($result, true);
274 274
         
275
-        if($code === 200) {
275
+        if ($code === 200) {
276 276
             $attributes = json_decode($result, true);
277 277
             $this->logger->debug('successfully requested user attributes from userinfo_endpoint', [
278 278
                'category' => get_class($this),
Please login to merge, or discard this patch.
src/Log.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @param  Iterable $config
71 71
      * @return Log
72 72
      */
73
-    public function setOptions(? Iterable $config = null): Log
73
+    public function setOptions(? Iterable $config = null) : Log
74 74
     {
75 75
         if ($config === null) {
76 76
             return $this;
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 
79 79
         foreach ($config as $option => $value) {
80 80
             if (!isset($value['enabled']) || $value['enabled'] === '1') {
81
-                if(!isset($value['class'])) {
81
+                if (!isset($value['class'])) {
82 82
                     throw new Exception('class option is requred');
83 83
                 }
84 84
 
85
-                if(isset($value['config'])) {
85
+                if (isset($value['config'])) {
86 86
                     $config = $value['config'];
87 87
                 } else {
88 88
                     $config = null;
Please login to merge, or discard this patch.
src/Http/Response.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function removeHeader(string $header): Response
111 111
     {
112
-        if(isset($this->headers[$header])) {
112
+        if (isset($this->headers[$header])) {
113 113
             unset($this->headers[$header]);
114 114
         }
115 115
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             $this->terminate();
213 213
         }
214 214
         
215
-        if($this->body instanceof Closure) {
215
+        if ($this->body instanceof Closure) {
216 216
             $body = $this->body->call($this);
217 217
         } else {
218 218
             $body = $this->body;
@@ -368,14 +368,14 @@  discard block
 block discarded – undo
368 368
      * @param  string $format
369 369
      * @return Response
370 370
      */
371
-    public function setOutputFormat(?string $format=null): Response
371
+    public function setOutputFormat(?string $format = null) : Response
372 372
     {
373
-        if($format === null) {
373
+        if ($format === null) {
374 374
             $this->output_format = null;
375 375
             return $this->removeHeader('Content-Type');
376 376
         }
377 377
 
378
-        if(!array_key_exists($format, self::OUTPUT_FORMATS)) {
378
+        if (!array_key_exists($format, self::OUTPUT_FORMATS)) {
379 379
             throw new Exception('invalid output format given');
380 380
         }
381 381
 
Please login to merge, or discard this patch.
src/Http/Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@
 block discarded – undo
58 58
      * @param   array $request
59 59
      * @return  void
60 60
      */
61
-    public function __construct(Logger $logger, ?array $request=null)
61
+    public function __construct(Logger $logger, ? array $request = null)
62 62
     {
63 63
         $this->logger = $logger;
64 64
 
65
-        if($request === null) {
65
+        if ($request === null) {
66 66
             $request = $_SERVER;
67 67
         }        
68 68
 
Please login to merge, or discard this patch.
src/Auth/Adapter/AdapterInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      * @param   Iterable $config
23 23
      * @return  void
24 24
      */
25
-    public function __construct(Logger $logger, ? Iterable $config=null);
25
+    public function __construct(Logger $logger, ? Iterable $config = null);
26 26
 
27 27
 
28 28
     /**
Please login to merge, or discard this patch.
src/Auth/Adapter/AbstractAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      * @param   Iterable $config
56 56
      * @return  void
57 57
      */
58
-    public function __construct(Logger $logger, ?Iterable $config=null)
58
+    public function __construct(Logger $logger, ?Iterable $config = null)
59 59
     {
60 60
         $this->logger = $logger;
61 61
         $this->setOptions($config);
Please login to merge, or discard this patch.