AppServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 3
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 7 1
A register() 0 6 2
1
<?php
2
3
/*
4
 * rmarchiv.tk
5
 * (c) 2016-2017 by Marcel 'ryg' Hering
6
 */
7
8
namespace App\Providers;
9
10
use Dingo\Api\Auth\Provider\JWT;
11
use Illuminate\Support\ServiceProvider;
12
13
class AppServiceProvider extends ServiceProvider
14
{
15
    /**
16
     * Bootstrap any application services.
17
     *
18
     * @return void
19
     */
20
    public function boot()
21
    {
22
        //
23
        app('Dingo\Api\Auth\Auth')->extend('jwt', function ($app) {
24
            return new JWT($app['Tymon\JWTAuth\JWTAuth']);
25
        });
26
    }
27
28
    /**
29
     * Register any application services.
30
     *
31
     * @return void
32
     */
33
    public function register()
34
    {
35
        if ($this->app->environment() == 'local') {
36
            $this->app->register('Iber\Generator\ModelGeneratorProvider');
37
        }
38
    }
39
}
40