AuthServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
A register() 0 2 1
1
<?php
2
3
namespace FaithGen\Messages\Providers;
4
5
use FaithGen\Messages\Models\Message;
6
use FaithGen\Messages\Policies\MessagePolicy;
7
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
8
use Illuminate\Support\Facades\Gate;
9
10
class AuthServiceProvider extends ServiceProvider
11
{
12
    protected $policies = [
13
        Message::class => MessagePolicy::class,
14
    ];
15
16
    /**
17
     * Bootstrap services.
18
     *
19
     * @return void
20
     */
21
    public function boot()
22
    {
23
        $this->registerPolicies();
24
25
        Gate::define('message.view', [MessagePolicy::class, 'view']);
26
    }
27
28
    /**
29
     * Register services.
30
     *
31
     * @return void
32
     */
33
    public function register()
34
    {
35
        //
36
    }
37
}
38