FileDeleteMultiple   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 8 2
1
<?php
2
3
namespace Ikechukwukalu\Clamavfileupload\Listeners;
4
5
use Ikechukwukalu\Clamavfileupload\Facades\Services\FileUpload;
6
use Ikechukwukalu\Clamavfileupload\Events\QueuedDeleteMultiple;
7
use Ikechukwukalu\Clamavfileupload\Events\QueuedForceDeleteMultiple;
8
use Illuminate\Contracts\Queue\ShouldQueue;
9
use Illuminate\Queue\InteractsWithQueue;
10
11
class FileDeleteMultiple implements ShouldQueue
12
{
13
14
    public function handle(QueuedDeleteMultiple|QueuedForceDeleteMultiple $event): void
15
    {
16
        if ($event instanceof QueuedForceDeleteMultiple) {
17
            FileUpload::forceDeleteMultiple($event->ids, $event->ref);
0 ignored issues
show
Bug introduced by
The method forceDeleteMultiple() does not exist on Ikechukwukalu\Clamavfile...des\Services\FileUpload. 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 ignore-call  annotation

17
            FileUpload::/** @scrutinizer ignore-call */ 
18
                        forceDeleteMultiple($event->ids, $event->ref);
Loading history...
18
            return;
19
        }
20
21
        FileUpload::deleteMultiple($event->ids, $event->ref);
0 ignored issues
show
Bug introduced by
The method deleteMultiple() does not exist on Ikechukwukalu\Clamavfile...des\Services\FileUpload. 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 ignore-call  annotation

21
        FileUpload::/** @scrutinizer ignore-call */ 
22
                    deleteMultiple($event->ids, $event->ref);
Loading history...
22
    }
23
24
}
25