@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function register() |
16 | 16 | { |
17 | - $this->mergeConfigFrom(__DIR__.'/config.php', 'laravel_video'); |
|
17 | + $this->mergeConfigFrom(__DIR__ . '/config.php', 'laravel_video'); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
@@ -24,6 +24,6 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function boot() |
26 | 26 | { |
27 | - $this->publishes([__DIR__.'/config.php' => config_path('laravel_video.php')], 'laravel_video'); |
|
27 | + $this->publishes([__DIR__ . '/config.php' => config_path('laravel_video.php')], 'laravel_video'); |
|
28 | 28 | } |
29 | 29 | } |
@@ -31,17 +31,17 @@ discard block |
||
31 | 31 | private function setHeader() |
32 | 32 | { |
33 | 33 | ob_get_clean(); |
34 | - header('Content-Type: '.$this->mime); |
|
34 | + header('Content-Type: ' . $this->mime); |
|
35 | 35 | header('Cache-Control: max-age=2592000, public'); |
36 | - header('Expires: '.gmdate('D, d M Y H:i:s', time() + 2592000).' GMT'); |
|
37 | - header('Last-Modified: '.gmdate('D, d M Y H:i:s', @filemtime($this->path)).' GMT'); |
|
36 | + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 2592000) . ' GMT'); |
|
37 | + header('Last-Modified: ' . gmdate('D, d M Y H:i:s', @filemtime($this->path)) . ' GMT'); |
|
38 | 38 | $this->start = 0; |
39 | 39 | $this->size = filesize($this->path); |
40 | 40 | $this->end = $this->size - 1; |
41 | - header('Accept-Ranges: 0-'.$this->end); |
|
41 | + header('Accept-Ranges: 0-' . $this->end); |
|
42 | 42 | |
43 | - if (! isset($_SERVER['HTTP_RANGE'])) { |
|
44 | - header('Content-Length: '.$this->size); |
|
43 | + if (!isset($_SERVER['HTTP_RANGE'])) { |
|
44 | + header('Content-Length: ' . $this->size); |
|
45 | 45 | |
46 | 46 | return; |
47 | 47 | } |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | public static function streamFile($path) |
123 | 123 | { |
124 | 124 | $stream = fopen($path, 'rb'); |
125 | - if (! $stream) { |
|
126 | - throw new \Exception('File not found in: '.$path, 6542); |
|
125 | + if (!$stream) { |
|
126 | + throw new \Exception('File not found in: ' . $path, 6542); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | (new static($path, $stream))->start(); |