UserLogedNotification   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A handle() 0 4 1
1
<?php
2
3
namespace App\Listeners;
4
5
use App\Events\LogedUser;
6
use App\Mail\Hello;
7
use Illuminate\Support\Facades\Mail;
8
9
class UserLogedNotification
10
{
11
    /**
12
     * Create the event listener.
13
     *
14
     * @return void
15
     */
16
    public function __construct()
17
    {
18
        //
19
    }
20
21
    /**
22
     * Handle the event.
23
     *
24
     * @param object $event
25
     *
26
     * @return void
27
     */
28
    public function handle(LogedUser $event)
29
    {
30
        $hello = new Hello($event->user);
31
        Mail::to($event->user)->send($hello);
32
    }
33
}
34