Passed
Push — main ( 5b7f53...c506ee )
by Sammy
01:28
created
src/Hopper.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
     public function url(): string
144 144
     {
145
-        return $this->webHost() . $_SERVER['REQUEST_URI'];
145
+        return $this->webHost().$_SERVER['REQUEST_URI'];
146 146
     }
147 147
 
148 148
     public function stay($url = null)
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     {
165 165
         header('Cache-Control: no-cache, must-revalidate');
166 166
         header('Expires: Mon, 01 Jan 1970 00:00:00 GMT');
167
-        header('Location: ' . $url);
167
+        header('Location: '.$url);
168 168
         exit();
169 169
     }
170 170
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
   // returns null if same as current URL (prevents endless redirection loop)
173 173
     public function referer(): ?string
174 174
     {
175
-        if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->webHost() . $_SERVER['REQUEST_URI']) {
175
+        if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != $this->webHost().$_SERVER['REQUEST_URI']) {
176 176
             return $_SERVER['HTTP_REFERER'];
177 177
         }
178 178
 
@@ -190,12 +190,12 @@  discard block
 block discarded – undo
190 190
       //Get file type and set it as Content Type
191 191
         $finfo = finfo_open(FILEINFO_MIME_TYPE);
192 192
 
193
-        header('Content-Type: ' . finfo_file($finfo, $file_path));
193
+        header('Content-Type: '.finfo_file($finfo, $file_path));
194 194
 
195 195
         finfo_close($finfo);
196 196
 
197 197
       //Use Content-Disposition: attachment to specify the filename
198
-        header('Content-Disposition: attachment; filename=' . $file_name);
198
+        header('Content-Disposition: attachment; filename='.$file_name);
199 199
 
200 200
       //No cache
201 201
         header('Expires: 0');
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         header('Pragma: public');
204 204
 
205 205
       //Define file size
206
-        header('Content-Length: ' . filesize($file_path));
206
+        header('Content-Length: '.filesize($file_path));
207 207
 
208 208
         ob_clean();
209 209
         flush();
@@ -224,12 +224,12 @@  discard block
 block discarded – undo
224 224
 
225 225
     public function webHost(): string
226 226
     {
227
-        return $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'];
227
+        return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'];
228 228
     }
229 229
 
230 230
     public function webRoot(): string
231 231
     {
232
-        return $this->webHost() . $this->basePath();
232
+        return $this->webHost().$this->basePath();
233 233
     }
234 234
 
235 235
     // return web base
@@ -247,10 +247,10 @@  discard block
 block discarded – undo
247 247
     public function filePath($setter = null): string
248 248
     {
249 249
         if (!is_null($setter)) {
250
-            $this->file_root = realpath($setter) . '/';
250
+            $this->file_root = realpath($setter).'/';
251 251
         }
252 252
 
253
-        return $this->file_root ?? __DIR__ . '/../../';
253
+        return $this->file_root ?? __DIR__.'/../../';
254 254
     }
255 255
 
256 256
 
Please login to merge, or discard this patch.