InfobipServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 19
ccs 4
cts 8
cp 0.5
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 13 1
1
<?php
2
3
namespace NotificationChannels\Infobip;
4
5
use Illuminate\Contracts\Events\Dispatcher;
6
use Illuminate\Support\Facades\Notification;
7
use Illuminate\Support\ServiceProvider;
8
9
class InfobipServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Register the application services.
13
     */
14 3
    public function register()
15
    {
16
        $this->app->bind(InfobipConfig::class, function () {
17
            return new InfobipConfig($this->app['config']['services.infobip']);
18 3
        });
19
20
        Notification::extend('infobip', function ($app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed.

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

Loading history...
21
            return new InfobipChannel(
22
                $this->app->make(Infobip::class),
23
                $this->app->make(Dispatcher::class)
24
            );
25 3
        });
26 3
    }
27
}
28