SendAuthenticationDetailNotification   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 4 3
1
<?php
2
3
namespace Pratiksh\Adminetic\Listeners;
4
5
use Illuminate\Support\Facades\Mail;
6
use Pratiksh\Adminetic\Mail\AuthenticationDetailMail;
7
8
class SendAuthenticationDetailNotification
9
{
10
    /**
11
     * Handle the event.
12
     *
13
     * @param  object  $event
14
     * @return void
15
     */
16
    public function handle($event)
17
    {
18
        if (env('MAIL_USERNAME') != null && env('MAIL_PASSWORD') != null) {
19
            Mail::to($event->user->email)->send(new AuthenticationDetailMail($event->user->email, $event->user->name, $event->password));
20
        }
21
    }
22
}
23