UserLoggedInEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A broadcastOn() 0 3 1
1
<?php
2
3
namespace Yeelight\Events\User;
4
5
use Illuminate\Queue\SerializesModels;
6
use Yeelight\Models\Foundation\User;
7
8
/**
9
 * Class UserLoggedInEvent
10
 *
11
 * @category Yeelight
12
 *
13
 * @package Yeelight\Events\User
14
 *
15
 * @author Sheldon Lee <[email protected]>
16
 *
17
 * @license https://opensource.org/licenses/MIT MIT
18
 *
19
 * @link https://www.yeelight.com
20
 */
21
class UserLoggedInEvent
22
{
23
    use SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Yeelight\Events\User\UserLoggedInEvent: $id, $class, $connection
Loading history...
24
25
    public $user;
26
27
    /**
28
     * Create a new event instance.
29
     *
30
     * @param User $user User
31
     */
32
    public function __construct(User $user)
33
    {
34
        $this->user = $user;
35
    }
36
37
    /**
38
     * Get the channels the event should be broadcast on.
39
     *
40
     * @return array
41
     */
42
    public function broadcastOn()
43
    {
44
        return [];
45
    }
46
}
47