Completed
Push — master ( 0b8712...2f8bc7 )
by Mihail
04:21
created
src/Ffcms/Core/Network/Request.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 
60 60
         $basePath = trim(App::$Properties->get('basePath'), '/');
61 61
         if ($basePath !== null && Str::length($basePath) > 0) {
62
-            $basePath = '/' . $basePath;
62
+            $basePath = '/'.$basePath;
63 63
         }
64 64
 
65 65
         if (!defined('env_no_uri') || env_no_uri === false) {
66
-            $basePath .= '/' . strtolower(env_name);
66
+            $basePath .= '/'.strtolower(env_name);
67 67
         }
68 68
 
69 69
         // we never try to use path's without friendly url's
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             } else {
90 90
                 // try to find language in pathway
91 91
                 foreach (App::$Properties->get('languages') as $lang) {
92
-                    if (Str::startsWith('/' . $lang, $this->getPathInfo())) {
92
+                    if (Str::startsWith('/'.$lang, $this->getPathInfo())) {
93 93
                         $this->language = $lang;
94 94
                         $this->languageInPath = true;
95 95
                     }
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
                     // parse query string
117 117
                     $queryString = null;
118 118
                     if (count($this->query->all()) > 0) {
119
-                        $queryString = '?' . http_build_query($this->query->all());
119
+                        $queryString = '?'.http_build_query($this->query->all());
120 120
                     }
121 121
 
122 122
                     // build response with redirect to language-based path
123
-                    $response = new Redirect($this->getSchemeAndHttpHost() . $this->basePath . '/' . $userLang . $this->getPathInfo() . $queryString);
123
+                    $response = new Redirect($this->getSchemeAndHttpHost().$this->basePath.'/'.$userLang.$this->getPathInfo().$queryString);
124 124
                     $response->send();
125 125
                     exit();
126 126
                 }
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
             // find "new path" as binding uri slug
179 179
             $binding = array_search($pathway, $map, true);
180 180
             // build url to redirection
181
-            $url = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/';
181
+            $url = $this->getSchemeAndHttpHost().$this->getBasePath().'/';
182 182
             if (App::$Properties->get('multiLanguage')) {
183
-                $url .= $this->language . '/';
183
+                $url .= $this->language.'/';
184 184
             }
185 185
             $url .= ltrim($binding, '/');
186 186
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     {
271 271
         $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo();
272 272
         if (!Str::startsWith('/', $route)) {
273
-            $route = '/' . $route;
273
+            $route = '/'.$route;
274 274
         }
275 275
         return $route;
276 276
     }
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
      */
381 381
     public function getFullUrl()
382 382
     {
383
-        return $this->getSchemeAndHttpHost() . $this->getRequestUri();
383
+        return $this->getSchemeAndHttpHost().$this->getRequestUri();
384 384
     }
385 385
 
386 386
     /**
Please login to merge, or discard this patch.