Passed
Push — main ( a8907a...afc192 )
by Sammy
21:50 queued 13:31
created
src/Hopper.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
     public function url(): string
149 149
     {
150
-        return $this->webHost() . $_SERVER['REQUEST_URI'];
150
+        return $this->webHost().$_SERVER['REQUEST_URI'];
151 151
     }
152 152
 
153 153
     public function stay($url = null)
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     {
170 170
         header('Cache-Control: no-cache, must-revalidate');
171 171
         header('Expires: Mon, 01 Jan 1970 00:00:00 GMT');
172
-        header('Location: ' . $url);
172
+        header('Location: '.$url);
173 173
         exit();
174 174
     }
175 175
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
   // returns null if same as current URL (prevents endless redirection loop)
178 178
     public function referer(): ?string
179 179
     {
180
-        if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->webHost() . $_SERVER['REQUEST_URI']) {
180
+        if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->webHost().$_SERVER['REQUEST_URI']) {
181 181
             return $_SERVER['HTTP_REFERER'];
182 182
         }
183 183
 
@@ -195,12 +195,12 @@  discard block
 block discarded – undo
195 195
       //Get file type and set it as Content Type
196 196
         $finfo = finfo_open(FILEINFO_MIME_TYPE);
197 197
 
198
-        header('Content-Type: ' . finfo_file($finfo, $file_path));
198
+        header('Content-Type: '.finfo_file($finfo, $file_path));
199 199
 
200 200
         finfo_close($finfo);
201 201
 
202 202
       //Use Content-Disposition: attachment to specify the filename
203
-        header('Content-Disposition: attachment; filename=' . $file_name);
203
+        header('Content-Disposition: attachment; filename='.$file_name);
204 204
 
205 205
       //No cache
206 206
         header('Expires: 0');
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         header('Pragma: public');
209 209
 
210 210
       //Define file size
211
-        header('Content-Length: ' . filesize($file_path));
211
+        header('Content-Length: '.filesize($file_path));
212 212
 
213 213
         ob_clean();
214 214
         flush();
@@ -229,12 +229,12 @@  discard block
 block discarded – undo
229 229
 
230 230
     public function webHost(): string
231 231
     {
232
-        return $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'];
232
+        return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'];
233 233
     }
234 234
 
235 235
     public function webRoot(): string
236 236
     {
237
-        return $this->webHost() . $this->basePath();
237
+        return $this->webHost().$this->basePath();
238 238
     }
239 239
 
240 240
     // return web base
@@ -252,10 +252,10 @@  discard block
 block discarded – undo
252 252
     public function filePath($setter = null): string
253 253
     {
254 254
         if ($setter !== null) {
255
-            $this->file_root = realpath($setter) . '/';
255
+            $this->file_root = realpath($setter).'/';
256 256
         }
257 257
 
258
-        return $this->file_root ?? __DIR__ . '/../../';
258
+        return $this->file_root ?? __DIR__.'/../../';
259 259
     }
260 260
 
261 261
 
Please login to merge, or discard this patch.