@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | if (array_key_exists('server-port', $this->request->server())) { |
| 105 | 105 | return $this->request->server()['server-port']; |
| 106 | 106 | } |
| 107 | - return $this->getSecure()?443:80; |
|
| 107 | + return $this->getSecure() ? 443 : 80; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | */ |
| 149 | 149 | private function createUribase(RequestWrapper $request) |
| 150 | 150 | { |
| 151 | - $scheme = $request->isSecure()?'https':'http'; |
|
| 151 | + $scheme = $request->isSecure() ? 'https' : 'http'; |
|
| 152 | 152 | $port = $request->getPort(); |
| 153 | 153 | if ($port == 80 && $scheme == 'http') { |
| 154 | 154 | $port = ''; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } else { |
| 158 | 158 | $port = ':'.$port; |
| 159 | 159 | } |
| 160 | - $base = $scheme.'://'. $request->getHost().$port; |
|
| 160 | + $base = $scheme.'://'.$request->getHost().$port; |
|
| 161 | 161 | $request->setUriBase($base); |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | bool $allowQuery = true, |
| 32 | 32 | ?string $default = null, |
| 33 | 33 | ?string $group = null |
| 34 | - ):?string { |
|
| 34 | + ): ?string { |
|
| 35 | 35 | $group = $group ?? $request->getAttribute('group'); |
| 36 | 36 | $default = $default ?? $request->getAttribute('module'); |
| 37 | 37 | $url = $this->route->create($this->getRouteName($name, $default, $group), $parameter, $allowQuery); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | protected function getUrlIndex(Request $request):string |
| 48 | 48 | { |
| 49 | - $indexArray = $this->conf('index') ?? [ 'index.php' ]; |
|
| 49 | + $indexArray = $this->conf('index') ?? ['index.php']; |
|
| 50 | 50 | $index = ltrim($request->getIndex(), '/'); |
| 51 | 51 | if (!in_array($index, $indexArray)) { |
| 52 | 52 | return $request->getIndex(); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | public function getUriBase(Request $request, bool $beautify = true):string |
| 134 | 134 | { |
| 135 | 135 | $index = $beautify ? $this->getUrlIndex($request) : $request->getIndex(); |
| 136 | - return $request->getUriBase() . $index; |
|
| 136 | + return $request->getUriBase().$index; |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /** |
@@ -144,6 +144,6 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | protected function getRouteGroupPrefix(?string $group):string |
| 146 | 146 | { |
| 147 | - return $group === null || $group === 'default' ? '': '@'. $group; |
|
| 147 | + return $group === null || $group === 'default' ? '' : '@'.$group; |
|
| 148 | 148 | } |
| 149 | 149 | } |