| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function process(): array |
||
| 18 | { |
||
| 19 | $result = $this->output->process(); |
||
| 20 | |||
| 21 | $zip = new ZipArchive(); |
||
| 22 | $filePath = '/tmp/' . time() . '.zip'; |
||
| 23 | $zip->open($filePath, ZipArchive::CREATE); |
||
| 24 | |||
| 25 | foreach ($result as $file) { |
||
| 26 | $zip->addFile($file); |
||
| 27 | } |
||
| 28 | $zip->close(); |
||
| 29 | |||
| 30 | return [ |
||
| 31 | $filePath |
||
| 32 | ]; |
||
| 34 | } |