GeneralPushNotificationEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Pratiksh\Adminetic\Events;
4
5
use Illuminate\Broadcasting\InteractsWithSockets;
6
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
7
use Illuminate\Foundation\Events\Dispatchable;
8
use Illuminate\Queue\SerializesModels;
9
10
class GeneralPushNotificationEvent implements ShouldBroadcastNow
11
{
12
    use Dispatchable, InteractsWithSockets, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Pratiksh\Adminetic\Event...alPushNotificationEvent: $id, $relations, $class, $connection, $keyBy
Loading history...
13
    public $data;
14
15
    /**
16
     * Create a new event instance.
17
     *
18
     * @return void
19
     */
20
    public function __construct($data)
21
    {
22
        $this->data = $data;
23
    }
24
25
    /**
26
     * Get the channels the event should broadcast on.
27
     *
28
     * @return \Illuminate\Broadcasting\Channel|array
29
     */
30
    public function broadcastOn()
31
    {
32
        return ['general_push_notification'];
33
    }
34
35
    public function broadcastAs()
36
    {
37
        return 'general-push-notification-event';
38
    }
39
}
40