Passed
Push — master ( dd055a...ca8538 )
by Pascal
13:19
created
src/Exporters/MediaExporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
 
187 187
     public function getProcessOutput(): ProcessOutput
188 188
     {
189
-        return tap(new StdListener, function (StdListener $listener) {
189
+        return tap(new StdListener, function(StdListener $listener) {
190 190
             $this->addListener($listener)->save();
191 191
             $listener->removeAllListeners();
192 192
             $this->removeListener($listener);
Please login to merge, or discard this patch.
src/Exporters/HLSPlaylistGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     public function get(array $segmentPlaylists, PHPFFMpeg $driver): string
71 71
     {
72
-        return Collection::make($segmentPlaylists)->map(function (Media $segmentPlaylist, $key) use ($driver) {
72
+        return Collection::make($segmentPlaylists)->map(function(Media $segmentPlaylist, $key) use ($driver) {
73 73
             $streamInfoLine = $this->getStreamInfoLine($segmentPlaylist, $key);
74 74
 
75 75
             $media = (new MediaOpener($segmentPlaylist->getDisk(), $driver))
Please login to merge, or discard this patch.
src/Exporters/HLSVideoFilters.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
         if (count($arguments) === 1 && !is_callable($arguments[0])) {
134 134
             $this->driver->addFilter($this->input(), $arguments[0], $this->output());
135 135
         } else {
136
-            $this->driver->addFilter(function (ComplexFilters $filters) use ($arguments) {
136
+            $this->driver->addFilter(function(ComplexFilters $filters) use ($arguments) {
137 137
                 $arguments[0]($filters, $this->input(), $this->output());
138 138
             });
139 139
         }
Please login to merge, or discard this patch.
src/Exporters/EncryptsHLSSegments.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $this->listener = new StdListener(HLSExporter::ENCRYPTION_LISTENER);
220 220
 
221 221
         $this->addListener($this->listener)
222
-            ->onEvent(HLSExporter::ENCRYPTION_LISTENER, function ($line) {
222
+            ->onEvent(HLSExporter::ENCRYPTION_LISTENER, function($line) {
223 223
                 if (!strpos($line, ".keyinfo' for reading")) {
224 224
                     return;
225 225
                 }
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
             return $this;
266 266
         }
267 267
 
268
-        $playlistMedia->each(function ($playlistMedia) {
268
+        $playlistMedia->each(function($playlistMedia) {
269 269
             $disk = $playlistMedia->getDisk();
270 270
             $path = $playlistMedia->getPath();
271 271
 
Please login to merge, or discard this patch.
src/Exporters/EncodingException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
             $runtimeException->getMessage(),
14 14
             $runtimeException->getCode(),
15 15
             $runtimeException->getPrevious()
16
-        ), function (self $exception) {
16
+        ), function(self $exception) {
17 17
             if (config('laravel-ffmpeg.set_command_and_error_output_on_exception')) {
18 18
                 $exception->message = $exception->getAlchemyException()->getMessage();
19 19
             }
Please login to merge, or discard this patch.
src/Exporters/HLSExporter.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
     private $segmentLength = 10;
25 25
 
26 26
     /**
27
-    * @var integer
28
-    */
27
+     * @var integer
28
+     */
29 29
     private $keyFrameInterval = 48;
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     private function getSegmentFilenameGenerator(): callable
110 110
     {
111
-        return $this->segmentFilenameGenerator ?: function ($name, $format, $key, $segments, $playlist) {
111
+        return $this->segmentFilenameGenerator ?: function($name, $format, $key, $segments, $playlist) {
112 112
             $segments("{$name}_{$key}_{$format->getKiloBitrate()}_%05d.ts");
113 113
             $playlist("{$name}_{$key}_{$format->getKiloBitrate()}.m3u8");
114 114
         };
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
             $baseName,
133 133
             $format,
134 134
             $key,
135
-            function ($path) use (&$segmentsPattern) {
135
+            function($path) use (&$segmentsPattern) {
136 136
                 $segmentsPattern = $path;
137 137
             },
138
-            function ($path) use (&$formatPlaylistPath) {
138
+            function($path) use (&$formatPlaylistPath) {
139 139
                 $formatPlaylistPath = $path;
140 140
             }
141 141
         );
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         $disk      = $media->getDisk();
229 229
         $directory = $media->getDirectory();
230 230
 
231
-        $this->pendingFormats->map(function ($formatAndCallback, $key) use ($disk, $directory) {
231
+        $this->pendingFormats->map(function($formatAndCallback, $key) use ($disk, $directory) {
232 232
             $disk->delete($directory . static::generateTemporarySegmentPlaylistFilename($key));
233 233
         });
234 234
 
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
         $baseName = $media->getDirectory() . $media->getFilenameWithoutExtension();
256 256
 
257
-        return $this->pendingFormats->map(function (array $formatAndCallback, $key) use ($baseName) {
257
+        return $this->pendingFormats->map(function(array $formatAndCallback, $key) use ($baseName) {
258 258
             [$format, $filtersCallback] = $formatAndCallback;
259 259
 
260 260
             [$segmentsPattern, $formatPlaylistPath] = $this->getSegmentPatternAndFormatPlaylistPath(
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
             $this->addFormatOutputMapping($format, $formatPlaylistOutput, $outs ?? ['0']);
275 275
 
276 276
             return $formatPlaylistOutput;
277
-        })->tap(function () {
277
+        })->tap(function() {
278 278
             $this->addHandlerToRotateEncryptionKey();
279 279
         });
280 280
     }
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
      */
302 302
     public function save(string $mainPlaylistPath = null): MediaOpener
303 303
     {
304
-        return $this->prepareSaving($mainPlaylistPath)->pipe(function ($segmentPlaylists) use ($mainPlaylistPath) {
304
+        return $this->prepareSaving($mainPlaylistPath)->pipe(function($segmentPlaylists) use ($mainPlaylistPath) {
305 305
             $result = parent::save();
306 306
 
307 307
             $playlist = $this->getPlaylistGenerator()->get(
Please login to merge, or discard this patch.
src/Exporters/HasProgressListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     {
47 47
         $format->removeAllListeners('progress');
48 48
 
49
-        $format->on('progress', function ($media, $format, $percentage, $remaining = null, $rate = null) {
49
+        $format->on('progress', function($media, $format, $percentage, $remaining = null, $rate = null) {
50 50
             if ($percentage !== $this->lastPercentage && $percentage < 100) {
51 51
                 $this->lastPercentage = $percentage;
52 52
                 $this->lastRemaining = $remaining ?: $this->lastRemaining;
Please login to merge, or discard this patch.
src/Exporters/HandlesConcatenation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
     private function addConcatFilterAndMapping(Media $outputMedia)
34 34
     {
35
-        $sources = $this->driver->getMediaCollection()->map(function ($media, $key) {
35
+        $sources = $this->driver->getMediaCollection()->map(function($media, $key) {
36 36
             return "[{$key}]";
37 37
         });
38 38
 
Please login to merge, or discard this patch.
src/Drivers/InteractsWithMediaStreams.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
             return iterator_to_array($this->media->getStreams());
21 21
         }
22 22
 
23
-        return $this->mediaCollection->map(function (Media $media) {
23
+        return $this->mediaCollection->map(function(Media $media) {
24 24
             return $this->fresh()->open(MediaCollection::make([$media]))->getStreams();
25 25
         })->collapse()->all();
26 26
     }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function getAudioStream(): ?Stream
55 55
     {
56
-        return Arr::first($this->getStreams(), function (Stream $stream) {
56
+        return Arr::first($this->getStreams(), function(Stream $stream) {
57 57
             return $stream->isAudio();
58 58
         });
59 59
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function getVideoStream(): ?Stream
65 65
     {
66
-        return Arr::first($this->getStreams(), function (Stream $stream) {
66
+        return Arr::first($this->getStreams(), function(Stream $stream) {
67 67
             return $stream->isVideo();
68 68
         });
69 69
     }
Please login to merge, or discard this patch.