Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function makeResponse(string $exportFormat, $content, string $fileName): Response |
||
23 | { |
||
24 | switch ($exportFormat) { |
||
25 | case 'Xlsx': |
||
26 | return new XlsxResponse($content, $fileName); |
||
27 | |||
28 | case 'Csv': |
||
29 | return new CsvResponse($content, $fileName); |
||
30 | |||
31 | default: |
||
32 | throw new InvalidResponseTypeException(); |
||
33 | } |
||
36 |