Completed
Push — master ( a8b099...15a87c )
by Raffael
02:55
created
src/Router.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -365,7 +365,7 @@
 block discarded – undo
365 365
                 switch($type) {
366 366
                     case 'bool':
367 367
                         if($param_value === 'false') {
368
-                             $return[$param->name] = false;
368
+                                $return[$param->name] = false;
369 369
                         } else {
370 370
                             $return[$param->name] = (bool)$param_value;
371 371
                         }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
      * @param   array $request
68 68
      * @return  void
69 69
      */
70
-    public function __construct(LoggerInterface $logger, ?array $request=null, ?ContainerInterface $container=null)
70
+    public function __construct(LoggerInterface $logger, ?array $request = null, ?ContainerInterface $container = null)
71 71
     {
72 72
         $this->logger = $logger;
73 73
         $this->container = $container;
74 74
 
75
-        if($request === null) {
75
+        if ($request === null) {
76 76
             $request = $_SERVER;
77 77
         }
78 78
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
             'code'    => $exception->getCode()
288 288
         ];
289 289
 
290
-        if(defined("$class::HTTP_CODE")) {
290
+        if (defined("$class::HTTP_CODE")) {
291 291
             $http_code = $class::HTTP_CODE;
292 292
         } else {
293 293
             $http_code = 500;
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
                     $param_value = $request_params[$param->name];
352 352
                 } elseif (isset($json_params[$param->name])) {
353 353
                     $param_value = $json_params[$param->name];
354
-                } else if($optional === true) {
354
+                } else if ($optional === true) {
355 355
                     $return[$param->name] = $param->getDefaultValue();
356 356
                     continue;
357 357
                 } else {
@@ -362,9 +362,9 @@  discard block
 block discarded – undo
362 362
                     throw new Exception('misssing required parameter '.$param->name);
363 363
                 }
364 364
 
365
-                switch($type) {
365
+                switch ($type) {
366 366
                     case 'bool':
367
-                        if($param_value === 'false') {
367
+                        if ($param_value === 'false') {
368 368
                              $return[$param->name] = false;
369 369
                         } else {
370 370
                             $return[$param->name] = (bool)$param_value;
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
                         $return[$param->name] = (array)$param_value;
381 381
                     break;
382 382
                     default:
383
-                        if(class_exists($type) && $param_value !== null) {
383
+                        if (class_exists($type) && $param_value !== null) {
384 384
                             $return[$param->name] = new $type($param_value);
385 385
                         } else {
386 386
                             $return[$param->name] = $param_value;
Please login to merge, or discard this patch.
src/Http.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
Please login to merge, or discard this patch.
src/Response.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function removeHeader(string $header): Response
102 102
     {
103
-        if(isset($this->headers[$header])) {
103
+        if (isset($this->headers[$header])) {
104 104
             unset($this->headers[$header]);
105 105
         }
106 106
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             return;
205 205
         }
206 206
 
207
-        if($this->body instanceof Closure) {
207
+        if ($this->body instanceof Closure) {
208 208
             $body = $this->body->call($this);
209 209
         } else {
210 210
             $body = $this->body;
@@ -362,14 +362,14 @@  discard block
 block discarded – undo
362 362
      * @param  string $format
363 363
      * @return Response
364 364
      */
365
-    public function setOutputFormat(?string $format=null): Response
365
+    public function setOutputFormat(?string $format = null): Response
366 366
     {
367
-        if($format === null) {
367
+        if ($format === null) {
368 368
             $this->output_format = null;
369 369
             return $this->removeHeader('Content-Type');
370 370
         }
371 371
 
372
-        if(!array_key_exists($format, self::OUTPUT_FORMATS)) {
372
+        if (!array_key_exists($format, self::OUTPUT_FORMATS)) {
373 373
             throw new Exception('invalid output format given');
374 374
         }
375 375
 
Please login to merge, or discard this patch.
src/Exception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
Please login to merge, or discard this patch.
src/Router/Route.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * balloon
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function match(): bool
83 83
     {
84
-        $regex = preg_replace_callback('#({([A-Z0-9a-z]+)\:\#(.+?)\#})|\{(.+?)\}#', function ($match) {
84
+        $regex = preg_replace_callback('#({([A-Z0-9a-z]+)\:\#(.+?)\#})|\{(.+?)\}#', function($match) {
85 85
             if (4 === count($match)) {
86 86
                 return '(?<'.$match[2].'>'.$match[3].'+)';
87 87
             }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public function setPath(string $path): self
173 173
     {
174
-        $this->path = (string) $path;
174
+        $this->path = (string)$path;
175 175
 
176 176
         return $this;
177 177
     }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
      */
289 289
     public function continuePropagation($next = true): self
290 290
     {
291
-        $this->continue_propagation = (bool) $next;
291
+        $this->continue_propagation = (bool)$next;
292 292
 
293 293
         return $this;
294 294
     }
Please login to merge, or discard this patch.