UserCreatedEventHandler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 19
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 7 1
1
<?php
2
3
namespace App\Containers\User\Events\Handlers;
4
5
use App\Containers\User\Events\Events\UserCreatedEvent;
6
use Illuminate\Contracts\Queue\ShouldQueue;
7
8
/**
9
 * Class UserCreatedEventHandler
10
 *
11
 * @author  Mahmoud Zalt  <[email protected]>
12
 */
13
class UserCreatedEventHandler implements ShouldQueue
14
{
15
16
    public function __construct()
17
    {
18
19
    }
20
21
    /**
22
     * @param \App\Containers\User\Events\Events\UserCreatedEvent $event
23
     */
24
    public function handle(UserCreatedEvent $event)
0 ignored issues
show
Unused Code introduced by
The parameter $event is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
    {
26
//        $this->welcomeEmail->to($event->user->email, $event->user->name)->send([
0 ignored issues
show
Unused Code Comprehensibility introduced by
57% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
27
//            'name'    => $event->user->name,
28
//            'appName' => 'Hello API'
29
//        ]);
30
    }
31
}
32