QueuedDelete   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A broadcastOn() 0 4 1
A __construct() 0 4 1
1
<?php
2
3
namespace Ikechukwukalu\Clamavfileupload\Events;
4
5
use Illuminate\Broadcasting\Channel;
6
use Illuminate\Broadcasting\InteractsWithSockets;
7
use Illuminate\Broadcasting\PresenceChannel;
8
use Illuminate\Broadcasting\PrivateChannel;
9
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
10
use Illuminate\Foundation\Events\Dispatchable;
11
use Illuminate\Queue\SerializesModels;
12
13
class QueuedDelete
14
{
15
    use Dispatchable, InteractsWithSockets, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Ikechukwukalu\Clamavfileupload\Events\QueuedDelete: $collectionClass, $id, $relations, $class, $connection, $keyBy
Loading history...
16
17
    public array|int|string $ids;
18
    public null|string $ref;
19
20
    /**
21
     * Create a new event instance.
22
     *
23
     * @param  string  $ref
24
     * @param  array|int|string|null  $ids
25
     */
26
    public function __construct(array|int|string $ids, null|string $ref = null)
27
    {
28
        $this->ref = $ref;
29
        $this->ids = $ids;
30
    }
31
32
    /**
33
     * Get the channels the event should broadcast on.
34
     *
35
     * @return array<int, \Illuminate\Broadcasting\Channel>
36
     */
37
    public function broadcastOn(): array
38
    {
39
        return [
40
            new PrivateChannel('channel-name'),
41
        ];
42
    }
43
}
44