AuthServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
1
<?php
2
3
namespace App\Providers;
4
5
use App\Http\Middleware\AppendTenantURL;
6
use App\Http\Middleware\IdentifyTenantByUsername;
7
use App\Http\Middleware\TranslateOAuthException;
8
use App\Models\Activity;
9
use App\Models\Candidate;
10
use App\Models\Message;
11
use App\Models\Note;
12
use App\Models\Recruitment;
13
use App\Models\RecruitmentUser;
14
use App\Policies\ActivityPolicy;
15
use App\Policies\CandidatePolicy;
16
use App\Policies\MessagePolicy;
17
use App\Policies\NotePolicy;
18
use App\Policies\RecruitmentPolicy;
19
use App\Policies\RecruitmentUserPolicy;
20
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
21
use Laravel\Passport\Passport;
22
23
class AuthServiceProvider extends ServiceProvider
24
{
25
    /**
26
     * The policy mappings for the application.
27
     *
28
     * @var array
29
     */
30
    protected $policies = [
31
        Recruitment::class     => RecruitmentPolicy::class,
32
        Candidate::class       => CandidatePolicy::class,
33
        Note::class            => NotePolicy::class,
34
        Message::class         => MessagePolicy::class,
35
        Activity::class        => ActivityPolicy::class,
36
        RecruitmentUser::class => RecruitmentUserPolicy::class,
37
    ];
38
39
    /**
40
     * Register any authentication / authorization services.
41
     *
42
     * @return void
43
     */
44
    public function boot()
45
    {
46
        $this->registerPolicies();
47
        Passport::routes(null, ['middleware' => [IdentifyTenantByUsername::class, AppendTenantURL::class, TranslateOAuthException::class]]);
48
    }
49
}
50