MailEventServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 1
c 2
b 1
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Giuga\LaravelMailLog;
4
5
use Giuga\LaravelMailLog\Listeners\MailSentListener;
6
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
7
use Illuminate\Mail\Events\MessageSent;
8
9
class MailEventServiceProvider extends ServiceProvider
10
{
11
    protected $listen = [
12
        MessageSent::class => [
13
            MailSentListener::class,
14
        ],
15
    ];
16
17
    /**
18
     * Bootstrap the application services.
19
     */
20
    public function boot()
21
    {
22
        parent::boot();
23
    }
24
25
    /**
26
     * Register the application services.
27
     */
28
    public function register()
29
    {
30
        // Laravel 8 need to invoke this to register the events defined at $listen
31
        parent::register();
32
    }
33
}
34