@@ -38,7 +38,7 @@ |
||
| 38 | 38 | if (array_key_exists($pathway, $routing['Redirect'])) { |
| 39 | 39 | $target = $this->getSchemeAndHttpHost(); // . $this->getBasePath() . '/' . rtrim($routing['Redirect'][$pathway], '/'); |
| 40 | 40 | if ($this->getBasePath() !== null && !Str::likeEmpty($this->getBasePath())) { |
| 41 | - $target .= '/' . $this->getBasePath(); |
|
| 41 | + $target .= '/'.$this->getBasePath(); |
|
| 42 | 42 | } |
| 43 | 43 | $target .= rtrim($routing['Redirect'][$pathway], '/'); |
| 44 | 44 | $redirect = new RedirectResponse($target); |
@@ -70,9 +70,9 @@ |
||
| 70 | 70 | // find "new path" as binding uri slug |
| 71 | 71 | $binding = array_search($pathway, $map, true); |
| 72 | 72 | // build url to redirection |
| 73 | - $url = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/'; |
|
| 73 | + $url = $this->getSchemeAndHttpHost().$this->getBasePath().'/'; |
|
| 74 | 74 | if (App::$Properties->get('multiLanguage')) { |
| 75 | - $url .= $this->language . '/'; |
|
| 75 | + $url .= $this->language.'/'; |
|
| 76 | 76 | } |
| 77 | 77 | $url .= ltrim($binding, '/'); |
| 78 | 78 | |
@@ -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(); |
@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | $basePath = trim(App::$Properties->get('basePath'), '/'); |
| 58 | 58 | if ($basePath !== null && Str::length($basePath) > 0) { |
| 59 | - $basePath = '/' . $basePath; |
|
| 59 | + $basePath = '/'.$basePath; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if (!defined('env_no_uri') || env_no_uri === false) { |
| 63 | - $basePath .= '/' . strtolower(env_name); |
|
| 63 | + $basePath .= '/'.strtolower(env_name); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | // we never try to use path's without friendly url's |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo(); |
| 95 | 95 | if (!Str::startsWith('/', $route)) { |
| 96 | - $route = '/' . $route; |
|
| 96 | + $route = '/'.$route; |
|
| 97 | 97 | } |
| 98 | 98 | return $route; |
| 99 | 99 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function getFullUrl(): string |
| 129 | 129 | { |
| 130 | - return $this->getSchemeAndHttpHost() . $this->getRequestUri(); |
|
| 130 | + return $this->getSchemeAndHttpHost().$this->getRequestUri(); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |