Passed
Branch master (2c519d)
by Iman
04:07
created
Category
src/StreamServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
      */
15 15
     public function register()
16 16
     {
17
-        Response::macro('streamVideoFile', function ($filePath) {
18
-            return response()->stream(function () use ($filePath) {
17
+        Response::macro('streamVideoFile', function($filePath) {
18
+            return response()->stream(function() use ($filePath) {
19 19
                 $stream = new VideoStreamer($filePath);
20 20
                 $stream->start();
21 21
             });
Please login to merge, or discard this patch.
src/VideoStreamer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     private function open()
33 33
     {
34
-        if (! ($this->stream = fopen($this->path, 'rb'))) {
34
+        if (!($this->stream = fopen($this->path, 'rb'))) {
35 35
             die('Could not open stream for reading');
36 36
         }
37 37
     }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $this->end = $this->size - 1;
53 53
         header("Accept-Ranges: 0-" . $this->end);
54 54
 
55
-        if (! isset($_SERVER['HTTP_RANGE'])) {
55
+        if (!isset($_SERVER['HTTP_RANGE'])) {
56 56
             header("Content-Length: " . $this->size);
57 57
 
58 58
             return;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $i = $this->start;
114 114
         set_time_limit(0);
115
-        while (! feof($this->stream) && $i <= $this->end) {
115
+        while (!feof($this->stream) && $i <= $this->end) {
116 116
             $bytesToRead = $this->buffer;
117 117
             if (($i + $bytesToRead) > $this->end) {
118 118
                 $bytesToRead = $this->end - $i + 1;
Please login to merge, or discard this patch.