From a7e74897221ffdee1e59d6975baf48c58b82c98b Mon Sep 17 00:00:00 2001 From: Marius Posthumus Date: Thu, 13 Jun 2024 12:16:15 +0200 Subject: [PATCH] feat: allow any number of arguments for the merge method of pdfEngines (#45) --- src/Modules/PdfEngines.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Modules/PdfEngines.php b/src/Modules/PdfEngines.php index 5218eb5..8faafd2 100644 --- a/src/Modules/PdfEngines.php +++ b/src/Modules/PdfEngines.php @@ -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()); }