GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

UserRegistered   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A broadcastOn() 0 4 1
1
<?php
2
3
namespace Afrittella\BackProject\Events;
4
5
use Illuminate\Broadcasting\Channel;
6
use Illuminate\Queue\SerializesModels;
7
use Illuminate\Broadcasting\PrivateChannel;
8
use Illuminate\Foundation\Events\Dispatchable;
9
use Illuminate\Broadcasting\InteractsWithSockets;
10
11
class UserRegistered
12
{
13
    use Dispatchable, InteractsWithSockets, SerializesModels;
14
15
    public $user_id;
16
17
    /**
18
     * Create a new event instance.
19
     *
20
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
21
     */
22
    public function __construct($id)
23
    {
24
25
        $this->user_id = $id;
26
    }
27
28
    /**
29
     * Get the channels the event should broadcast on.
30
     *
31
     * @return Channel|array
32
     */
33
    public function broadcastOn()
34
    {
35
        return new PrivateChannel('channel-name');
36
    }
37
}
38