Passed
Push — dev6 ( 50a53d...e5f62e )
by Ron
15:45
created

FlaggedTipCommentEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
dl 0
loc 16
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace App\Events;
4
5
use App\Models\TechTipComment;
6
use App\Models\User;
7
use Illuminate\Broadcasting\Channel;
8
use Illuminate\Broadcasting\InteractsWithSockets;
9
use Illuminate\Broadcasting\PresenceChannel;
10
use Illuminate\Broadcasting\PrivateChannel;
11
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
12
use Illuminate\Foundation\Events\Dispatchable;
13
use Illuminate\Queue\SerializesModels;
14
15
class FlaggedTipCommentEvent
16
{
17
    use Dispatchable, InteractsWithSockets, SerializesModels;
1 ignored issue
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Events\FlaggedTipCommentEvent: $id, $relations, $class, $connection, $keyBy
Loading history...
18
19
    public $comment;
20
    public $flaggedBy;
21
22
    /**
23
     * Create a new event instance.
24
     *
25
     * @return void
26
     */
27
    public function __construct(TechTipComment $comment, User $flaggedBy)
28
    {
29
        $this->comment   = $comment;
30
        $this->flaggedBy = $flaggedBy;
31
    }
32
33
    /**
34
     * Get the channels the event should broadcast on.
35
     *
36
     * @return \Illuminate\Broadcasting\Channel|array
37
     */
38
    // public function broadcastOn()
39
    // {
40
    //     return new PrivateChannel('channel-name');
41
    // }
42
}
43