EventServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 6

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 19 1
1
<?php
2
3
/**
4
 * This file is part of laravel.su package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
declare(strict_types=1);
10
11
namespace App\Providers;
12
13
use App\Models\Tag;
14
use App\Models\Tip;
15
use App\Models\User;
16
use App\Models\Article;
17
use App\Models\DocsPage;
18
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
19
20
/**
21
 * Class EventServiceProvider.
22
 */
23
class EventServiceProvider extends ServiceProvider
24
{
25
    /**
26
     * @var array
27
     */
28
    protected $listen = [];
29
30
    /**
31
     * @return void
32
     */
33
    public function boot(): void
34
    {
35
        User::observe(User\AvatarUploaderObserver::class);
36
        User::observe(User\EmailConfirmationObserver::class);
37
38
        Article::observe(Article\ContentObserver::class);
39
        Article::observe(Article\SlugObserver::class);
40
        Article::observe(Article\PublishedDateObserver::class);
41
        Article::observe(Article\ContentPreviewObserver::class);
42
43
        Tag::observe(Tag\ColorObserver::class);
44
45
        Tip::observe(Tip\ContentObserver::class);
46
47
        DocsPage::observe(DocsPage\SlugObserver::class);
48
        DocsPage::observe(DocsPage\ContentObserver::class);
49
50
        parent::boot();
51
    }
52
}
53