Passed
Push — dev6 ( 5ebf7f...1a3248 )
by Ron
16:55
created

EmailSettingsUpdatedEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A broadcastOn() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace App\Events\Admin;
4
5
use App\Http\Requests\Admin\EmailSettingsRequest;
6
use Illuminate\Broadcasting\Channel;
7
use Illuminate\Broadcasting\InteractsWithSockets;
8
use Illuminate\Broadcasting\PresenceChannel;
9
use Illuminate\Broadcasting\PrivateChannel;
10
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
11
use Illuminate\Foundation\Events\Dispatchable;
12
use Illuminate\Queue\SerializesModels;
13
14
class EmailSettingsUpdatedEvent
15
{
16
    use Dispatchable, InteractsWithSockets, SerializesModels;
17
18
    public $settings;
19
20
    /**
21
     * Create a new event instance.
22
     *
23
     * @return void
24
     */
25
    public function __construct(EmailSettingsRequest $settings)
26
    {
27
        $this->settings = $settings;
28
    }
29
30
    /**
31
     * Get the channels the event should broadcast on.
32
     *
33
     * @return \Illuminate\Broadcasting\Channel|array
34
     */
35
    public function broadcastOn()
36
    {
37
        return new PrivateChannel('channel-name');
38
    }
39
}
40