We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 237-242 (lines=6) @@ | ||
| 234 | public function uploadFileToDisk($value, $attribute_name, $disk, $destination_path) |
|
| 235 | { |
|
| 236 | // if a new file is uploaded, delete the file from the disk |
|
| 237 | if (request()->hasFile($attribute_name) && |
|
| 238 | $this->{$attribute_name} && |
|
| 239 | $this->{$attribute_name} != null) { |
|
| 240 | \Storage::disk($disk)->delete($this->{$attribute_name}); |
|
| 241 | $this->attributes[$attribute_name] = null; |
|
| 242 | } |
|
| 243 | ||
| 244 | // if the file input is empty, delete the file from the disk |
|
| 245 | if (is_null($value) && $this->{$attribute_name} != null) { |
|
| @@ 245-248 (lines=4) @@ | ||
| 242 | } |
|
| 243 | ||
| 244 | // if the file input is empty, delete the file from the disk |
|
| 245 | if (is_null($value) && $this->{$attribute_name} != null) { |
|
| 246 | \Storage::disk($disk)->delete($this->{$attribute_name}); |
|
| 247 | $this->attributes[$attribute_name] = null; |
|
| 248 | } |
|
| 249 | ||
| 250 | // if a new file is uploaded, store it on disk and its filename in the database |
|
| 251 | if (request()->hasFile($attribute_name) && request()->file($attribute_name)->isValid()) { |
|