| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 6 | public function saveFile(UploadedFile $file) |
|
| 20 | { |
||
| 21 | 6 | $fileName = $this->cleanFileName($file->getClientOriginalName()); |
|
| 22 | 6 | $fileName = $this->checkForDuplicate($fileName); |
|
| 23 | 6 | $file->storeAs($this->path, $fileName, $this->disk); |
|
| 24 | |||
| 25 | 6 | Log::debug('New File stored. Details - ', ['disk' => $this->disk, 'path' => $this->path, 'filename' => $fileName]); |
|
| 26 | 6 | return $fileName; |
|
| 27 | } |
||
| 54 |