SendGridApiServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 4 1
1
<?php
2
3
namespace StephaneCoinon\SendGridActivity\Integrations\Laravel;
4
5
use Illuminate\Database\Eloquent\Factory;
6
use Illuminate\Support\ServiceProvider;
7
use StephaneCoinon\SendGridActivity\Integrations\Framework;
8
use StephaneCoinon\SendGridActivity\SendGrid;
9
10
class SendGridApiServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Bootstrap any application services.
14
     *
15
     * @return void
16
     */
17
    public function boot()
18
    {
19
        Framework::laravel();
20
        app(Factory::class)->load(__DIR__ . '/factories');
21
    }
22
23
    /**
24
     * Register bindings in the container.
25
     *
26
     * @return void
27
     */
28
    public function register()
29
    {
30
        $this->app->singleton(SendGrid::class, function ($app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

30
        $this->app->singleton(SendGrid::class, function (/** @scrutinizer ignore-unused */ $app) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
            return new SendGrid(config('services.sendgrid.key'));
32
        });
33
    }
34
}
35