@@ -59,11 +59,11 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -152,9 +152,9 @@ discard block |
||
152 | 152 | // check if pathway is the same with target and redirect to source from static routing |
153 | 153 | if (Obj::isArray($aliasMap) && Arr::in($this->getPathInfo(), $aliasMap)) { |
154 | 154 | $source = array_search($this->getPathInfo(), $aliasMap); |
155 | - $targetUri = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/'; |
|
155 | + $targetUri = $this->getSchemeAndHttpHost().$this->getBasePath().'/'; |
|
156 | 156 | if (App::$Properties->get('multiLanguage') === true) { |
157 | - $targetUri .= $this->language . '/'; |
|
157 | + $targetUri .= $this->language.'/'; |
|
158 | 158 | } |
159 | 159 | $targetUri .= ltrim($source, '/'); |
160 | 160 | $response = new Redirect($targetUri); |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | { |
244 | 244 | $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo(); |
245 | 245 | if (!Str::startsWith('/', $route)) { |
246 | - $route = '/' . $route; |
|
246 | + $route = '/'.$route; |
|
247 | 247 | } |
248 | 248 | return $route; |
249 | 249 | } |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | */ |
354 | 354 | public function getFullUrl() |
355 | 355 | { |
356 | - return $this->getSchemeAndHttpHost() . $this->getRequestUri(); |
|
356 | + return $this->getSchemeAndHttpHost().$this->getRequestUri(); |
|
357 | 357 | } |
358 | 358 | |
359 | 359 | /** |