Passed
Push — main ( f4f617...3ef0a0 )
by Sammy
01:46
created
hopper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     {
124 124
         try {
125 125
             $url = $this->generate($route, $route_params);
126
-        } catch (\Exception $e) {
126
+        }catch (\Exception $e) {
127 127
             $url = $this->prehop(self::ROUTE_HOME_NAME);
128 128
         }
129 129
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     {
172 172
         header('Cache-Control: no-cache, must-revalidate');
173 173
         header('Expires: Mon, 01 Jan 1970 00:00:00 GMT');
174
-        header('Location: ' . $url);
174
+        header('Location: '.$url);
175 175
         exit();
176 176
     }
177 177
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
   // returns null if same as current URL (prevents endless redirection loop)
180 180
     public function referer()
181 181
     {
182
-        if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->web_host() . $_SERVER['REQUEST_URI']) {
182
+        if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->web_host().$_SERVER['REQUEST_URI']) {
183 183
             return $_SERVER['HTTP_REFERER'];
184 184
         }
185 185
 
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
       //Get file type and set it as Content Type
198 198
         $finfo = finfo_open(FILEINFO_MIME_TYPE);
199 199
 
200
-        header('Content-Type: ' . finfo_file($finfo, $file_path));
200
+        header('Content-Type: '.finfo_file($finfo, $file_path));
201 201
 
202 202
         finfo_close($finfo);
203 203
 
204 204
       //Use Content-Disposition: attachment to specify the filename
205
-        header('Content-Disposition: attachment; filename=' . $file_name);
205
+        header('Content-Disposition: attachment; filename='.$file_name);
206 206
 
207 207
       //No cache
208 208
         header('Expires: 0');
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         header('Pragma: public');
211 211
 
212 212
       //Define file size
213
-        header('Content-Length: ' . filesize($file_path));
213
+        header('Content-Length: '.filesize($file_path));
214 214
 
215 215
         ob_clean();
216 216
         flush();
@@ -231,12 +231,12 @@  discard block
 block discarded – undo
231 231
 
232 232
     public function web_host(): string
233 233
     {
234
-        return $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'];
234
+        return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'];
235 235
     }
236 236
 
237 237
     public function web_root(): string
238 238
     {
239
-        return $this->web_host() . $this->basePath();
239
+        return $this->web_host().$this->basePath();
240 240
     }
241 241
 
242 242
     // return web base
@@ -254,6 +254,6 @@  discard block
 block discarded – undo
254 254
 
255 255
     public function setFilePath($setter)
256 256
     {
257
-        $this->file_root = realpath($setter) . '/';
257
+        $this->file_root = realpath($setter).'/';
258 258
     }
259 259
 }
Please login to merge, or discard this patch.