Completed
Push — master ( 739b2d...365154 )
by Raffael
02:34
created
src/Http/Exception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Micro
Please login to merge, or discard this patch.
src/Http/Router/Route.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Micro
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @param   array $params
73 73
      * @return  void
74 74
      */
75
-    public function __construct(string $path, $class, ?string $method=null, array $params=[])
75
+    public function __construct(string $path, $class, ? string $method = null, array $params = [])
76 76
     {
77 77
         $this->setPath($path);
78 78
         $this->setClass($class);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function match(): bool
90 90
     {
91
-        $regex = preg_replace_callback('#({([A-Z0-9a-z]+)\:\#(.+?)\#})|\{(.+?)\}#', function ($match) {
91
+        $regex = preg_replace_callback('#({([A-Z0-9a-z]+)\:\#(.+?)\#})|\{(.+?)\}#', function($match) {
92 92
             if (count($match) === 4) {
93 93
                 return '(?<'.$match[2].'>'.$match[3].'+)';
94 94
             } else {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      * @param  array $constructor
118 118
      * @return array
119 119
      */
120
-    public function getCallable($constructor=[]): array
120
+    public function getCallable($constructor = []): array
121 121
     {
122 122
         if (is_object($this->class)) {
123 123
             $instance = $this->class;
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      * @param   string $name
140 140
      * @return  string
141 141
      */
142
-    protected function _buildMethodName(?string $name): string
142
+    protected function _buildMethodName(? string $name) : string
143 143
     {
144 144
         $result = $this->router->getVerb();
145 145
         
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
      * @param   string $method
265 265
      * @return  Route
266 266
      */
267
-    public function setMethod(?string $method): Route
267
+    public function setMethod(? string $method) : Route
268 268
     {
269 269
         $this->method = $method;
270 270
         return $this;
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
      * @param  bool $next
313 313
      * @return Route
314 314
      */
315
-    public function continuePropagation($next=true): Route
315
+    public function continuePropagation($next = true): Route
316 316
     {
317 317
         $this->continue_propagation = (bool)$next;
318 318
         return $this;
Please login to merge, or discard this patch.
src/Http/Response.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Micro
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      * @param  bool $body_only
156 156
      * @return Response
157 157
      */
158
-    public function setBody($body, bool $body_only=false): Response
158
+    public function setBody($body, bool $body_only = false): Response
159 159
     {
160 160
         $this->body = $body;
161 161
         $this->body_only = $body_only;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     {
184 184
         $this->sendHeaders();
185 185
         $status = Http::STATUS_CODES[$this->code];
186
-        header('HTTP/1.0 ' . $this->code . ' ' . $status, true, $this->code);
186
+        header('HTTP/1.0 '.$this->code.' '.$status, true, $this->code);
187 187
 
188 188
         if ($this->body === null && $this->code == 204) {
189 189
             $this->terminate();
Please login to merge, or discard this patch.
src/Http/Router.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Micro
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      * @param  array $constructor
183 183
      * @return bool
184 184
      */
185
-    public function run(array $constructor=[]): bool
185
+    public function run(array $constructor = []): bool
186 186
     {
187 187
         $this->logger->info('execute requested route ['.$this->path.']', [
188 188
             'category' => get_class($this),
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                 if (!empty($body)) {
287 287
                     $json_params = json_decode($body, true);
288 288
                 } else {
289
-                    $parts  = explode('&', $_SERVER['QUERY_STRING']);
289
+                    $parts = explode('&', $_SERVER['QUERY_STRING']);
290 290
                     if (!empty($parts)) {
291 291
                         $json_params = json_decode(urldecode($parts[0]), true);
292 292
                     }
Please login to merge, or discard this patch.
src/Log/Adapter/File.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Micro
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param   Iterable $options
35 35
      * @return  AdapterInterface
36 36
      */
37
-    public function setOptions(?Iterable $config=null): AdapterInterface
37
+    public function setOptions(? Iterable $config = null) : AdapterInterface
38 38
     {
39 39
         parent::setOptions($config);
40 40
 
Please login to merge, or discard this patch.
src/Log/Adapter/Stdout.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Micro
@@ -70,15 +70,15 @@  discard block
 block discarded – undo
70 70
 
71 71
         // Check if given foreground color found
72 72
         if (isset($this->foreground_colors[$foreground_color])) {
73
-            $colored_string .= "\033[" . $this->foreground_colors[$foreground_color] . "m";
73
+            $colored_string .= "\033[".$this->foreground_colors[$foreground_color]."m";
74 74
         }
75 75
         // Check if given background color found
76 76
         if (isset($this->background_colors[$background_color])) {
77
-            $colored_string .= "\033[" . $this->background_colors[$background_color] . "m";
77
+            $colored_string .= "\033[".$this->background_colors[$background_color]."m";
78 78
         }
79 79
 
80 80
         // Add string and end coloring
81
-        $colored_string .=  $string . "\033[0m";
81
+        $colored_string .= $string."\033[0m";
82 82
 
83 83
         return $colored_string;
84 84
     }
Please login to merge, or discard this patch.
src/Log/Adapter/AdapterInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Micro
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param Iterable $options
30 30
      * @return void
31 31
      */
32
-    public function __construct(?Iterable $config=null);
32
+    public function __construct(? Iterable $config = null);
33 33
     
34 34
 
35 35
     /**
@@ -60,5 +60,5 @@  discard block
 block discarded – undo
60 60
      * @param   Iterable $options
61 61
      * @return  AdapterInterface
62 62
      */
63
-    public function setOptions(?Iterable $config=null): AdapterInterface;
63
+    public function setOptions(? Iterable $config = null) : AdapterInterface;
64 64
 }
Please login to merge, or discard this patch.
src/Log/Adapter/Syslog.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Micro
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      * @param   Iterable $options
43 43
      * @return  AdapterInterface
44 44
      */
45
-    public function setOptions(?Iterable $config=null)
45
+    public function setOptions(? Iterable $config = null)
46 46
     {
47 47
         parent::setOptions($options);
48 48
 
Please login to merge, or discard this patch.
src/Log/Adapter/AbstractAdapter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 /**
5 5
  * Micro
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @param Iterable $options
52 52
      * @return void
53 53
      */
54
-    public function __construct(?Iterable $config=null)
54
+    public function __construct(? Iterable $config = null)
55 55
     {
56 56
         $this->setOptions($config);
57 57
     }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @param   Iterable $options
95 95
      * @return  AdapterInterface
96 96
      */
97
-    public function setOptions(?Iterable $config=null): AdapterInterface
97
+    public function setOptions(? Iterable $config = null) : AdapterInterface
98 98
     {
99 99
         if ($config === null) {
100 100
             return $this;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                 break;
108 108
                
109 109
                 case 'level':
110
-                    if(!is_numeric($val)) {
110
+                    if (!is_numeric($val)) {
111 111
                         throw new Exception\InvalidArgument('log level must be a number');
112 112
                     }
113 113
 
Please login to merge, or discard this patch.