| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 11 | 
| Code Lines | 5 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 6 | 
| CRAP Score | 2 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 29 | 3 | public function downloadOld(Request $request, Activity $activity, ModuleInstance $moduleInstance, File $file) | |
| 30 |     { | ||
| 31 | 3 |         $this->authorize('file.download'); | |
| 32 | |||
| 33 | 2 |         if(Storage::exists($file->path)) { | |
| 34 | 1 | return Storage::download($file->path, $file->filename, [ | |
| 35 | 1 | 'X-Vapor-Base64-Encode' => 'True' | |
| 36 | ]); | ||
| 37 | } | ||
| 38 | |||
| 39 | 1 | throw new HttpException(404, 'File not found'); | |
| 40 | } | ||
| 42 | } |