UserRemoved::broadcastOn()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Acacha\Users\Events;
4
5
use Illuminate\Broadcasting\Channel;
6
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Broadcasting\PrivateChannel;
9
use Illuminate\Foundation\Events\Dispatchable;
10
use Illuminate\Broadcasting\InteractsWithSockets;
11
12
/**
13
 * Class UserRemoved.
14
 *
15
 * @package Acacha\Users\Events
16
 */
17
class UserRemoved implements ShouldBroadcast
18
{
19
    use Dispatchable, InteractsWithSockets, SerializesModels;
20
21
    public $users;
22
23
    /**
24
     * UserRemoved constructor.
25
     *
26
     * @param $users
27
     */
28
    public function __construct($users)
29
    {
30
        $this->users = $users;
31
    }
32
33
34
    /**
35
     * Get the channels the event should broadcast on.
36
     *
37
     * @return Channel|array
38
     */
39
    public function broadcastOn()
40
    {
41
        return new PrivateChannel('acacha-users');
42
    }
43
}
44