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::broadcastOn()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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