AppServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 32
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 4 2
1
<?php
2
3
namespace App\Providers;
4
5
use App\Resolvers\SocialUserResolver;
6
use Coderello\SocialGrant\Resolvers\SocialUserResolverInterface;
7
use Illuminate\Http\Resources\Json\JsonResource;
8
use Illuminate\Support\Facades\Schema;
9
use Illuminate\Support\ServiceProvider;
10
11
class AppServiceProvider extends ServiceProvider
12
{
13
    /**
14
     * All of the container bindings that should be registered.
15
     *
16
     * @var array
17
     */
18
    public $bindings = [
19
        SocialUserResolverInterface::class => SocialUserResolver::class,
20
    ];
21
22
    /**
23
     * Register any application services.
24
     *
25
     * @return void
26
     */
27
    public function register()
28
    {
29
        if ($this->app->environment() !== 'production') {
30
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
31
        }
32
    }
33
34
    /**
35
     * Bootstrap any application services.
36
     *
37
     * @return void
38
     */
39
    public function boot()
40
    {
41
        Schema::defaultStringLength(191);
42
        JsonResource::withoutWrapping();
43
    }
44
}
45