Skip to content

Commit

Permalink
feat: allow any number of arguments for the merge method of pdfEngines (
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusjp authored Jun 13, 2024
1 parent ee1d120 commit a7e7489
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Modules/PdfEngines.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,10 @@ public function metadata(array $metadata): self
*
* Note: the merging order is determined by the order of the arguments.
*/
public function merge(Stream $pdf1, Stream $pdf2, Stream ...$pdfs): RequestInterface
public function merge(Stream ...$pdfs): RequestInterface
{
$index = $this->index ?? new HrtimeIndex();

$this->formFile($index->create() . '_' . $pdf1->getFilename(), $pdf1->getStream());
$this->formFile($index->create() . '_' . $pdf2->getFilename(), $pdf2->getStream());

foreach ($pdfs as $pdf) {
$this->formFile($index->create() . '_' . $pdf->getFilename(), $pdf->getStream());
}
Expand Down

0 comments on commit a7e7489

Please sign in to comment.