CandidateDeleteListener   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A handle() 0 4 2
1
<?php
2
3
namespace App\Listeners;
4
5
use App\Events\CandidateDeleted;
6
use App\Utils\MessageService;
7
8
class CandidateDeleteListener
9
{
10
    /**
11
     * Create the event listener.
12
     *
13
     * @return void
14
     */
15
    public function __construct()
16
    {
17
        //
18
    }
19
20
    /**
21
     * Handle the event.
22
     *
23
     * @param CandidateDeleted $event
24
     *
25
     * @return void
26
     */
27
    public function handle(CandidateDeleted $event)
28
    {
29
        if ($event->emailAddress) {
30
            MessageService::notifyDeletedCandidate($event->candidate, $event->emailAddress);
31
        }
32
    }
33
}
34