LogedUser   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A broadcastOn() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace App\Events;
4
5
use App\User;
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 LogedUser
13
{
14
    use Dispatchable, InteractsWithSockets, SerializesModels;
15
16
    public $user;
17
18
    /**
19
     * LoggedUser constructor.
20
     *
21
     * @param $user
22
     */
23
    public function __construct(User $user)
24
    {
25
        $this->user = $user;
26
    }
27
28
    /**
29
     * Get the channels the event should broadcast on.
30
     *
31
     * @return \Illuminate\Broadcasting\Channel|array
32
     */
33
    public function broadcastOn()
34
    {
35
        return new PrivateChannel('channel-name');
36
    }
37
}
38