@@ -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 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | { |
| 104 | 104 | try { |
| 105 | 105 | $url = $this->generate($route, $route_params); |
| 106 | - } catch (\Exception $e) { |
|
| 106 | + }catch (\Exception $e) { |
|
| 107 | 107 | $url = $this->hyp(self::ROUTE_HOME_NAME); |
| 108 | 108 | } |
| 109 | 109 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | { |
| 154 | 154 | header('Cache-Control: no-cache, must-revalidate'); |
| 155 | 155 | header('Expires: Mon, 01 Jan 1970 00:00:00 GMT'); |
| 156 | - header('Location: ' . $url); |
|
| 156 | + header('Location: '.$url); |
|
| 157 | 157 | exit(); |
| 158 | 158 | } |
| 159 | 159 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | // returns null if same as current URL (prevents endless redirection loop) |
| 162 | 162 | public function referer() |
| 163 | 163 | { |
| 164 | - if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->webHost() . $_SERVER['REQUEST_URI']) { |
|
| 164 | + if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->webHost().$_SERVER['REQUEST_URI']) { |
|
| 165 | 165 | return $_SERVER['HTTP_REFERER']; |
| 166 | 166 | } |
| 167 | 167 | |
@@ -179,12 +179,12 @@ discard block |
||
| 179 | 179 | //Get file type and set it as Content Type |
| 180 | 180 | $finfo = finfo_open(FILEINFO_MIME_TYPE); |
| 181 | 181 | |
| 182 | - header('Content-Type: ' . finfo_file($finfo, $file_path)); |
|
| 182 | + header('Content-Type: '.finfo_file($finfo, $file_path)); |
|
| 183 | 183 | |
| 184 | 184 | finfo_close($finfo); |
| 185 | 185 | |
| 186 | 186 | //Use Content-Disposition: attachment to specify the filename |
| 187 | - header('Content-Disposition: attachment; filename=' . $file_name); |
|
| 187 | + header('Content-Disposition: attachment; filename='.$file_name); |
|
| 188 | 188 | |
| 189 | 189 | //No cache |
| 190 | 190 | header('Expires: 0'); |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | header('Pragma: public'); |
| 193 | 193 | |
| 194 | 194 | //Define file size |
| 195 | - header('Content-Length: ' . filesize($file_path)); |
|
| 195 | + header('Content-Length: '.filesize($file_path)); |
|
| 196 | 196 | |
| 197 | 197 | ob_clean(); |
| 198 | 198 | flush(); |
@@ -213,12 +213,12 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | public function webHost(): string |
| 215 | 215 | { |
| 216 | - return $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']; |
|
| 216 | + return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST']; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | public function webRoot(): string |
| 220 | 220 | { |
| 221 | - return $this->webHost() . $this->basePath(); |
|
| 221 | + return $this->webHost().$this->basePath(); |
|
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | // return web base |
@@ -236,10 +236,10 @@ discard block |
||
| 236 | 236 | public function filePath($setter = null): string |
| 237 | 237 | { |
| 238 | 238 | if (!is_null($setter)) { |
| 239 | - $this->file_root = realpath($setter) . '/'; |
|
| 239 | + $this->file_root = realpath($setter).'/'; |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | - return $this->file_root ?? __DIR__ . '/../../'; |
|
| 242 | + return $this->file_root ?? __DIR__.'/../../'; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | |