• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rich-id / pdf-template-bundle / #19

11 Mar 2024 11:38AM UTC coverage: 0.0%. Remained the same
#19

push

Matthias Devlamynck
Update dependencies

0 of 179 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Domain/Pdf/Trait/PdfMergerTrait.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace RichId\PdfTemplateBundle\Domain\Pdf\Trait;
6

7
use mikehaertl\pdftk\Pdf;
8

9
trait PdfMergerTrait
10
{
11
    use PdfTempFileTrait;
12

13
    /** @param string[] $sources */
14
    private function mergePdfs(array $sources): string
15
    {
16
        return $this->withTempDir(function (string $tempDir) use ($sources) {
×
17
            $pdf = new Pdf();
×
18
            $pdf->ignoreWarnings = true;
×
19

20
            foreach ($sources as $index => $source) {
×
21
                $pdf->addFile($this->copySource($source, $tempDir, $index + 1));
×
22
            }
23

24
            $result = $pdf->toString();
×
25

26
            if (\is_bool($result)) {
×
27
                throw new \Exception('Failed to generate pdf file');
×
28
            }
29

30
            return $result;
×
31
        });
×
32
    }
33
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc