Total Complexity | 5 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class PrinterService |
||
8 | { |
||
9 | /** |
||
10 | * @param array $config |
||
11 | */ |
||
12 | public function __construct(private array $config) |
||
13 | {} |
||
14 | |||
15 | /** |
||
16 | * @param string $templatePath |
||
17 | * @param array $config |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | private function getPdf(string $templatePath, array $config = []): string |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param string $template |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getSessionReport(string $template): string |
||
38 | { |
||
39 | return $this->getPdf("tontine.report.$template.session"); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param string $template |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getProfitsReport(string $template): string |
||
48 | { |
||
49 | return $this->getPdf("tontine.report.$template.profits"); |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @param string $template |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getRoundReport(string $template): string |
||
60 | } |
||
61 | } |
||
62 |