@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // set mobile collapse id for toggle |
38 | 38 | $mobCollapseId = $elements['collapseId']; |
39 | 39 | if (Str::likeEmpty($mobCollapseId)) { |
40 | - $mobCollapseId = Str::randomLatin(mt_rand(6,12)) . mt_rand(1, 99); |
|
40 | + $mobCollapseId = Str::randomLatin(mt_rand(6, 12)).mt_rand(1, 99); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // set element id for toggle |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | // generate output dom of bootstrap navbar |
100 | 100 | $dom = new Dom(); |
101 | 101 | $body = $dom->div(function() use ($leftBuild, $rightBuild, $itemsStatic){ |
102 | - return $leftBuild . $itemsStatic . $rightBuild; |
|
102 | + return $leftBuild.$itemsStatic.$rightBuild; |
|
103 | 103 | }, ['class' => 'collapse navbar-collapse', 'id' => $mobCollapseId]); |
104 | 104 | |
105 | 105 | // drow <nav @properties>@next</nav> |
@@ -110,17 +110,17 @@ discard block |
||
110 | 110 | $header = $dom->div(function() use ($dom, $elements, $mobCollapseId){ |
111 | 111 | // drow <button @collapse>@next</button> |
112 | 112 | $collapseButton = $dom->button(function() use ($dom){ |
113 | - $toggleItem = $dom->span(function(){ |
|
113 | + $toggleItem = $dom->span(function() { |
|
114 | 114 | return 'Toggle menu'; |
115 | 115 | }, ['class' => 'sr-only']); |
116 | 116 | $toggleIcon = null; |
117 | 117 | for ($i = 0; $i < 3; $i++) { |
118 | - $toggleIcon .= $dom->span(function(){ |
|
118 | + $toggleIcon .= $dom->span(function() { |
|
119 | 119 | return null; |
120 | 120 | }, ['class' => 'icon-bar']); |
121 | 121 | } |
122 | - return $toggleItem . $toggleIcon; |
|
123 | - }, ['type' => 'button', 'class' => 'navbar-toggle collapsed', 'data-toggle' => 'collapse', 'data-target' => '#' . $mobCollapseId]); |
|
122 | + return $toggleItem.$toggleIcon; |
|
123 | + }, ['type' => 'button', 'class' => 'navbar-toggle collapsed', 'data-toggle' => 'collapse', 'data-target' => '#'.$mobCollapseId]); |
|
124 | 124 | // drow <div @brand>@brandtext<?div> |
125 | 125 | $brand = null; |
126 | 126 | if (isset($elements['brand'])) { |
@@ -135,10 +135,10 @@ discard block |
||
135 | 135 | }, $elements['brand']['property']); |
136 | 136 | } |
137 | 137 | } |
138 | - return $collapseButton . $brand; |
|
138 | + return $collapseButton.$brand; |
|
139 | 139 | }, ['class' => 'navbar-header']); |
140 | 140 | // return header and body concat |
141 | - return $header . $body; |
|
141 | + return $header.$body; |
|
142 | 142 | }, $elements['container']); |
143 | 143 | }, $elements['nav']); |
144 | 144 | } |
@@ -60,11 +60,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | /** |