BatchImportParseFinished::broadcastOn()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Events;
4
5
use App\Models\Batch;
6
use Illuminate\Broadcasting\Channel;
7
use Illuminate\Broadcasting\InteractsWithSockets;
8
use Illuminate\Broadcasting\PrivateChannel;
9
use Illuminate\Foundation\Events\Dispatchable;
10
use Illuminate\Queue\SerializesModels;
11
12
class BatchImportParseFinished
13
{
14
    use Dispatchable, InteractsWithSockets, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Events\BatchImportParseFinished: $id, $class, $connection
Loading history...
15
    /**
16
     * @var Batch
17
     */
18
    public $batch;
19
20
    /**
21
     * Create a new event instance.
22
     *
23
     * @return void
24
     */
25
    public function __construct(Batch $batch)
26
    {
27
        $this->batch = $batch;
28
    }
29
30
    /**
31
     * Get the channels the event should broadcast on.
32
     *
33
     * @return \Illuminate\Broadcasting\Channel|array
34
     */
35
    public function broadcastOn()
36
    {
37
        return new PrivateChannel('channel-name');
38
    }
39
}
40