1 | <?php |
||||||
2 | |||||||
3 | namespace Ikechukwukalu\Clamavfileupload\Services; |
||||||
4 | |||||||
5 | use Ikechukwukalu\Clamavfileupload\Contracts\FileUploadInterface; |
||||||
6 | use Ikechukwukalu\Clamavfileupload\Facades\Support\BasicFileUpload; |
||||||
7 | use Ikechukwukalu\Clamavfileupload\Models\FileUpload as FileUploadModel; |
||||||
8 | use Ikechukwukalu\Clamavfileupload\Support\ClamavFileUpload; |
||||||
9 | use Illuminate\Database\Eloquent\Collection as EloquentCollection; |
||||||
10 | use Illuminate\Http\Request; |
||||||
11 | |||||||
12 | class NoClamavFileUpload extends ClamavFileUpload implements FileUploadInterface |
||||||
13 | { |
||||||
14 | |||||||
15 | private BasicFileUpload $fileUpload; |
||||||
16 | |||||||
17 | /** |
||||||
18 | * Upload single or multiple files. |
||||||
19 | * |
||||||
20 | * @param \Illuminate\Http\Request $request |
||||||
21 | * @param array $settings |
||||||
22 | * @return \Ikechukwukalu\Clamavfileupload\Models\FileUpload |
||||||
23 | * @return \Illuminate\Database\Eloquent\Collection |
||||||
24 | * @return bool |
||||||
25 | */ |
||||||
26 | public function uploadFiles(Request $request, |
||||||
27 | array $settings = []): bool|FileUploadModel|EloquentCollection |
||||||
28 | { |
||||||
29 | $this->fileUpload = new BasicFileUpload; |
||||||
30 | $this->fileUpload::customFileUploadSettings($settings); |
||||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||||
31 | $this->fileUpload::fileUploadSettings($request); |
||||||
0 ignored issues
–
show
The method
fileUploadSettings() does not exist on Ikechukwukalu\Clamavfile...Support\BasicFileUpload . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
32 | |||||||
33 | return $this->runFileUpload($settings); |
||||||
0 ignored issues
–
show
|
|||||||
34 | } |
||||||
35 | |||||||
36 | /** |
||||||
37 | * Run files scan and upload. |
||||||
38 | * |
||||||
39 | * @param array $settings |
||||||
40 | * @return \Ikechukwukalu\Clamavfileupload\Models\FileUpload |
||||||
41 | * @return \Illuminate\Database\Eloquent\Collection |
||||||
42 | * @return bool |
||||||
43 | */ |
||||||
44 | protected function runFileUpload($settings = []): bool|FileUploadModel|EloquentCollection |
||||||
45 | { |
||||||
46 | if ($data = $this->fileUpload::fileUpload()) { |
||||||
0 ignored issues
–
show
The method
fileUpload() does not exist on Ikechukwukalu\Clamavfile...Support\BasicFileUpload . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
47 | $this->ref = $this->fileUpload::getRef(); |
||||||
0 ignored issues
–
show
The method
getRef() does not exist on Ikechukwukalu\Clamavfile...Support\BasicFileUpload . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
48 | $this->success = $this->fileUpload::isSuccessful(); |
||||||
0 ignored issues
–
show
The method
isSuccessful() does not exist on Ikechukwukalu\Clamavfile...Support\BasicFileUpload . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
49 | |||||||
50 | return $data; |
||||||
51 | } |
||||||
52 | |||||||
53 | $this->failedUpload($this->fileUpload::getErrorMessage()); |
||||||
0 ignored issues
–
show
The method
getErrorMessage() does not exist on Ikechukwukalu\Clamavfile...Support\BasicFileUpload . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
54 | return false; |
||||||
0 ignored issues
–
show
|
|||||||
55 | } |
||||||
56 | |||||||
57 | } |
||||||
58 |