Passed
Push — master ( 54313c...3e1de2 )
by Fran
03:22
created
src/base/Request.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,9 +8,10 @@  discard block
 block discarded – undo
8 8
     function getallheaders()
9 9
     {
10 10
         $headers = array();
11
-        foreach ($_SERVER as $h => $v)
12
-            if (preg_match('/HTTP_(.+)/', $h, $hp))
11
+        foreach ($_SERVER as $h => $v) {
12
+                    if (preg_match('/HTTP_(.+)/', $h, $hp))
13 13
                 $headers[$hp[1]] = $v;
14
+        }
14 15
         return $headers;
15 16
     }
16 17
 }
@@ -214,7 +215,9 @@  discard block
 block discarded – undo
214 215
      */
215 216
     public function redirect($url = null)
216 217
     {
217
-        if (null === $url) $url = $this->getServer('HTTP_ORIGIN');
218
+        if (null === $url) {
219
+            $url = $this->getServer('HTTP_ORIGIN');
220
+        }
218 221
         ob_start();
219 222
         header('Location: ' . $url);
220 223
         ob_end_clean();
@@ -261,7 +264,9 @@  discard block
 block discarded – undo
261 264
         $host = $this->getServerName();
262 265
         $protocol = $protocol ? $this->getProtocol() : '';
263 266
         $url = '';
264
-        if (!empty($host) && !empty($protocol)) $url = $protocol . $host;
267
+        if (!empty($host) && !empty($protocol)) {
268
+            $url = $protocol . $host;
269
+        }
265 270
         return $url;
266 271
     }
267 272
 
Please login to merge, or discard this patch.