UserInvited::__construct()   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
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Acacha\Users\Events;
4
5
use Acacha\Users\Models\UserInvitation;
6
use Illuminate\Broadcasting\Channel;
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 UserInvited.
14
 *
15
 * @package App\Events
16
 */
17
class UserInvited
18
{
19
    use Dispatchable, InteractsWithSockets, SerializesModels;
20
21
    public $invitation;
22
23
    /**
24
     * UserInvited constructor.
25
     *
26
     * @param $invitation
27
     */
28
    public function __construct(UserInvitation $invitation)
29
    {
30
        $this->invitation = $invitation;
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