Completed
Push — master ( 8320f0...1fd9bf )
by Mihail
05:33
created
src/Ffcms/Core/Network/Request.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 
61 61
         $basePath = trim(App::$Properties->get('basePath'), '/');
62 62
         if ($basePath !== null && Str::length($basePath) > 0) {
63
-            $basePath = '/' . $basePath;
63
+            $basePath = '/'.$basePath;
64 64
         }
65 65
 
66 66
         if (!defined('env_no_uri') || env_no_uri === false) {
67
-            $basePath .= '/' . strtolower(env_name);
67
+            $basePath .= '/'.strtolower(env_name);
68 68
         }
69 69
 
70 70
         // we never try to use path's without friendly url's
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             } else {
91 91
                 // try to find language in pathway
92 92
                 foreach (App::$Properties->get('languages') as $lang) {
93
-                    if (Str::startsWith('/' . $lang, $this->getPathInfo())) {
93
+                    if (Str::startsWith('/'.$lang, $this->getPathInfo())) {
94 94
                         $this->language = $lang;
95 95
                         $this->languageInPath = true;
96 96
                     }
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
                     // parse query string
118 118
                     $queryString = null;
119 119
                     if (count($this->query->all()) > 0) {
120
-                        $queryString = '?' . http_build_query($this->query->all());
120
+                        $queryString = '?'.http_build_query($this->query->all());
121 121
                     }
122 122
 
123 123
                     // build response with redirect to language-based path
124
-                    $response = new Redirect($this->getSchemeAndHttpHost() . $this->basePath . '/' . $userLang . $this->getPathInfo() . $queryString);
124
+                    $response = new Redirect($this->getSchemeAndHttpHost().$this->basePath.'/'.$userLang.$this->getPathInfo().$queryString);
125 125
                     $response->send();
126 126
                     exit();
127 127
                 }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         if (array_key_exists($pathway, $routing['Redirect'])) {
181 181
             $target = $this->getSchemeAndHttpHost(); // . $this->getBasePath() . '/' . rtrim($routing['Redirect'][$pathway], '/');
182 182
             if ($this->getBasePath() !== null && !Str::likeEmpty($this->getBasePath())) {
183
-                $target .= '/' . $this->getBasePath();
183
+                $target .= '/'.$this->getBasePath();
184 184
             }
185 185
             $target .= rtrim($routing['Redirect'][$pathway], '/');
186 186
             $redirect = new Redirect($target);
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
             // find "new path" as binding uri slug
207 207
             $binding = array_search($pathway, $map, true);
208 208
             // build url to redirection
209
-            $url = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/';
209
+            $url = $this->getSchemeAndHttpHost().$this->getBasePath().'/';
210 210
             if (App::$Properties->get('multiLanguage')) {
211
-                $url .= $this->language . '/';
211
+                $url .= $this->language.'/';
212 212
             }
213 213
             $url .= ltrim($binding, '/');
214 214
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
     {
303 303
         $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo();
304 304
         if (!Str::startsWith('/', $route)) {
305
-            $route = '/' . $route;
305
+            $route = '/'.$route;
306 306
         }
307 307
         return $route;
308 308
     }
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
      */
428 428
     public function getFullUrl()
429 429
     {
430
-        return $this->getSchemeAndHttpHost() . $this->getRequestUri();
430
+        return $this->getSchemeAndHttpHost().$this->getRequestUri();
431 431
     }
432 432
 
433 433
     /**
Please login to merge, or discard this patch.