Passed
Push — master ( c8108e...7c8a03 )
by 世昌
02:22
created
suda/src/application/processor/FileRangeProccessor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function __construct($file)
32 32
     {
33
-        $this->file = $file instanceof SplFileObject? $file : new SplFileObject($file);
33
+        $this->file = $file instanceof SplFileObject ? $file : new SplFileObject($file);
34 34
         $this->mime = MimeType::getMimeType($this->file->getExtension());
35 35
     }
36 36
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     protected function sendMultipleRangePart(Response $response, array $range)
122 122
     {
123 123
         $response->write('Content-Type: '.$this->mime."\r\n");
124
-        $response->write('Content-Range: '.$this->getRangeHeader($range) ."\r\n\r\n");
124
+        $response->write('Content-Range: '.$this->getRangeHeader($range)."\r\n\r\n");
125 125
     }
126 126
 
127 127
     /**
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      * @param string $range
181 181
      * @return array
182 182
      */
183
-    protected function parseRange(string $range):?array
183
+    protected function parseRange(string $range): ?array
184 184
     {
185 185
         $range = trim($range);
186 186
         if (strrpos($range, '-') === strlen($range) - 1) {
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
             list($start, $end) = \explode('-', $range, 2);
193 193
             $length = intval($end - $start);
194 194
             if ($length <= 0) {
195
-                return ['start' => intval($start) , 'end' => $this->file->getSize() - 1 ];
195
+                return ['start' => intval($start), 'end' => $this->file->getSize() - 1];
196 196
             }
197
-            return ['start' => intval($start) , 'end' => intval($end) ];
197
+            return ['start' => intval($start), 'end' => intval($end)];
198 198
         }
199 199
         return null;
200 200
     }
Please login to merge, or discard this patch.