Passed
Push — master ( 97bace...a8719d )
by refat
03:57
created
Core/System/Http/Request.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
     $requestUri = $this->server('REQUEST_URI');
29 29
 
30
-    if (strpos($requestUri, '?')) list($requestUri, $queryString) = explode('?', $requestUri);
30
+    if (strpos($requestUri, '?')) {
31
+        list($requestUri, $queryString) = explode('?', $requestUri);
32
+    }
31 33
 
32 34
     if (! in_array($script, ['/', '\\'])) {
33 35
 
@@ -37,7 +39,9 @@  discard block
 block discarded – undo
37 39
       $this->url = $requestUri;
38 40
     }
39 41
 
40
-    if ($this->url !== '/') $this->url = rtrim($this->url, '/');
42
+    if ($this->url !== '/') {
43
+        $this->url = rtrim($this->url, '/');
44
+    }
41 45
 
42 46
     $isSecure = false;
43 47
 
@@ -45,8 +49,7 @@  discard block
 block discarded – undo
45 49
 
46 50
       $isSecure = true;
47 51
 
48
-    }
49
-    elseif (! empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || ! empty($_SERVER['HTTP_X_FORWARDED_SSL'])) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
52
+    } elseif (! empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || ! empty($_SERVER['HTTP_X_FORWARDED_SSL'])) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
50 53
       $isSecure = true;
51 54
     }
52 55
 
@@ -100,7 +103,9 @@  discard block
 block discarded – undo
100 103
 
101 104
   public function file($input)
102 105
   {
103
-    if (isset($this->files[$input])) return $this->files[$input];
106
+    if (isset($this->files[$input])) {
107
+        return $this->files[$input];
108
+    }
104 109
 
105 110
     $upoadedFile = new UploadeFile($this->app, $input);
106 111
 
Please login to merge, or discard this patch.