Passed
Branch beta (1b8e35)
by Jon
07:16
created

EloquentServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 2 1
1
<?php
2
3
namespace App\Providers;
4
5
use App\Models\Access\User\User;
6
use App\Models\Elementset;
7
use App\Models\Vocabulary;
8
use Illuminate\Database\Eloquent\Relations\Relation;
9
use Illuminate\Support\ServiceProvider;
10
11
class EloquentServiceProvider extends ServiceProvider
12
{
13
    /**
14
     * Bootstrap the application services.
15
     *
16
     * @return void
17
     */
18
    public function boot()
19
    {
20
        Relation::morphMap([
21
            'User'       => User::class,
22
            'Vocabulary' => Vocabulary::class,
23
            'Elementset' => Elementset::class,
24
        ]);
25
    }
26
27
    /**
28
     * Register the application services.
29
     *
30
     * @return void
31
     */
32
    public function register()
33
    {
34
        //
35
    }
36
}
37