@@ -6,6 +6,6 @@ |
||
6 | 6 | { |
7 | 7 | public function __construct($message, $code = 0, $previous = null) |
8 | 8 | { |
9 | - parent::__construct('KADRO_ROUTER_ERR_' . $message, $code, $previous); |
|
9 | + parent::__construct('KADRO_ROUTER_ERR_'.$message, $code, $previous); |
|
10 | 10 | } |
11 | 11 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | { |
150 | 150 | try { |
151 | 151 | $url = $this->generate($route, $route_params); |
152 | - } catch (\Exception $e) { |
|
152 | + }catch (\Exception $e) { |
|
153 | 153 | $url = $this->prehop(self::ROUTE_HOME_NAME); |
154 | 154 | } |
155 | 155 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | { |
198 | 198 | header('Cache-Control: no-cache, must-revalidate'); |
199 | 199 | header('Expires: Mon, 01 Jan 1970 00:00:00 GMT'); |
200 | - header('Location: ' . $url); |
|
200 | + header('Location: '.$url); |
|
201 | 201 | exit(); |
202 | 202 | } |
203 | 203 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | // returns null if same as current URL (prevents endless redirection loop) |
206 | 206 | public function referer() |
207 | 207 | { |
208 | - if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->web_host() . $_SERVER['REQUEST_URI']) { |
|
208 | + if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->web_host().$_SERVER['REQUEST_URI']) { |
|
209 | 209 | return $_SERVER['HTTP_REFERER']; |
210 | 210 | } |
211 | 211 | |
@@ -223,12 +223,12 @@ discard block |
||
223 | 223 | //Get file type and set it as Content Type |
224 | 224 | $finfo = finfo_open(FILEINFO_MIME_TYPE); |
225 | 225 | |
226 | - header('Content-Type: ' . finfo_file($finfo, $file_path)); |
|
226 | + header('Content-Type: '.finfo_file($finfo, $file_path)); |
|
227 | 227 | |
228 | 228 | finfo_close($finfo); |
229 | 229 | |
230 | 230 | //Use Content-Disposition: attachment to specify the filename |
231 | - header('Content-Disposition: attachment; filename=' . $file_name); |
|
231 | + header('Content-Disposition: attachment; filename='.$file_name); |
|
232 | 232 | |
233 | 233 | //No cache |
234 | 234 | header('Expires: 0'); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | header('Pragma: public'); |
237 | 237 | |
238 | 238 | //Define file size |
239 | - header('Content-Length: ' . filesize($file_path)); |
|
239 | + header('Content-Length: '.filesize($file_path)); |
|
240 | 240 | |
241 | 241 | ob_clean(); |
242 | 242 | flush(); |
@@ -257,12 +257,12 @@ discard block |
||
257 | 257 | |
258 | 258 | public function web_host(): string |
259 | 259 | { |
260 | - return $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']; |
|
260 | + return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST']; |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | public function web_root(): string |
264 | 264 | { |
265 | - return $this->web_host() . $this->web_base(); |
|
265 | + return $this->web_host().$this->web_base(); |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | public function web_base(): string |
@@ -282,6 +282,6 @@ discard block |
||
282 | 282 | |
283 | 283 | public function set_file_root($setter) |
284 | 284 | { |
285 | - $this->file_root = realpath($setter) . '/'; |
|
285 | + $this->file_root = realpath($setter).'/'; |
|
286 | 286 | } |
287 | 287 | } |