EventServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
1
<?php
2
3
namespace App\Providers;
4
5
use App\Events\InteractionOnPage;
6
use App\Events\UserDeleted;
7
use App\Events\UserLeaveOrganization;
8
use App\Listeners\AnonymizeUserResponse;
9
use App\Listeners\SendCustomEmailVerificationNotification;
10
use App\Listeners\SetInteractionToRegisteredUserListener;
11
use App\Listeners\SetPageDryStateListener;
12
use App\Observers\PageObserver;
13
use App\Src\UseCases\Infra\Sql\Model\PageModel;
14
use Illuminate\Auth\Events\Registered;
15
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
16
17
class EventServiceProvider extends ServiceProvider
18
{
19
    protected $listen = [
20
        Registered::class => [
21
            SendCustomEmailVerificationNotification::class,
22
            SetInteractionToRegisteredUserListener::class
23
        ],
24
        InteractionOnPage::class => [
25
            SetPageDryStateListener::class,
26
            SetInteractionToRegisteredUserListener::class
27
        ],
28
        UserDeleted::class => [
29
            AnonymizeUserResponse::class
30
        ],
31
        UserLeaveOrganization::class => [
32
            AnonymizeUserResponse::class
33
        ]
34
    ];
35
36
    public function boot()
37
    {
38
        parent::boot();
39
40
        PageModel::observe(PageObserver::class);
41
    }
42
}
43