Skip to content

Commit

Permalink
Fix dynamic concurrency in example
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Aug 22, 2023
1 parent 5288d3c commit 943352b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/ffmpeg.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$start = microtime(true);

Pipeline::fromIterable(new DirectoryIterator('.'))
->concurrent(3)
->concurrent($concurrency)

Check failure on line 14 in examples/ffmpeg.php

View workflow job for this annotation

GitHub Actions / PHP 8.2

InvalidScalarArgument

examples/ffmpeg.php:14:18: InvalidScalarArgument: Argument 1 of Amp\Pipeline\Pipeline::concurrent expects int, but 3|string provided (see https://psalm.dev/012)
->filter(fn ($item) => $item->getExtension() === 'mkv')
->map(fn ($item) => createVideoClip($ffmpeg, $item->getPathname(), getTempDestination()))
->forEach(fn ($result) => getStdout()->write('Successfully created clip from ' . $result[0] . ' => ' . $result[1] . PHP_EOL));
Expand Down

0 comments on commit 943352b

Please sign in to comment.