@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | // try to find language in pathway |
| 45 | 45 | foreach (App::$Properties->get('languages') as $lang) { |
| 46 | - if (Str::startsWith('/' . $lang, $this->getPathInfo())) { |
|
| 46 | + if (Str::startsWith('/'.$lang, $this->getPathInfo())) { |
|
| 47 | 47 | $this->language = $lang; |
| 48 | 48 | $this->languageInPath = true; |
| 49 | 49 | } |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | // parse query string |
| 81 | 81 | $queryString = null; |
| 82 | 82 | if (count($this->query->all()) > 0) { |
| 83 | - $queryString = '?' . http_build_query($this->query->all()); |
|
| 83 | + $queryString = '?'.http_build_query($this->query->all()); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | // build response with redirect to language-based path |
| 87 | - $redirectUrl = $this->getSchemeAndHttpHost() . $this->basePath . '/' . $userLang . $this->getPathInfo() . $queryString; |
|
| 87 | + $redirectUrl = $this->getSchemeAndHttpHost().$this->basePath.'/'.$userLang.$this->getPathInfo().$queryString; |
|
| 88 | 88 | $response = new RedirectResponse($redirectUrl); |
| 89 | 89 | $response->send(); |
| 90 | 90 | exit(); |
@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $basePath = trim(App::$Properties->get('basePath'), '/'); |
| 60 | 60 | if ($basePath !== null && Str::length($basePath) > 0) { |
| 61 | - $basePath = '/' . $basePath; |
|
| 61 | + $basePath = '/'.$basePath; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | if (!defined('env_no_uri') || env_no_uri === false) { |
| 65 | - $basePath .= '/' . strtolower(env_name); |
|
| 65 | + $basePath .= '/'.strtolower(env_name); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | // we never try to use path's without friendly url's |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo(); |
| 97 | 97 | if (!Str::startsWith('/', $route)) { |
| 98 | - $route = '/' . $route; |
|
| 98 | + $route = '/'.$route; |
|
| 99 | 99 | } |
| 100 | 100 | return $route; |
| 101 | 101 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | public function getFullUrl(): string |
| 131 | 131 | { |
| 132 | - return $this->getSchemeAndHttpHost() . $this->getRequestUri(); |
|
| 132 | + return $this->getSchemeAndHttpHost().$this->getRequestUri(); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $url = $this->getSchemeAndHttpHost(); |
| 157 | 157 | $sub = null; |
| 158 | 158 | if ($this->getInterfaceSlug() && Str::length($this->getInterfaceSlug()) > 0) { |
| 159 | - $sub = $this->getInterfaceSlug() . '/'; |
|
| 159 | + $sub = $this->getInterfaceSlug().'/'; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | if ($this->languageInPath()) { |