UniNotifyServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 6 1
A provides() 0 4 1
1
<?php
2
3
namespace Reallyli\Uninotify;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * Class UniNotifyServiceProvider.
9
 */
10
class UniNotifyServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Bootstrap the application services.
14
     */
15
    public function boot()
16
    {
17
        $this->publishes([
18
            __DIR__.'/../config/uninotify.php' => config_path('uninotify.php'),
19
        ], 'config');
20
    }
21
22
    /**
23
     * @return void
24
     */
25
    public function register()
26
    {
27
        $this->app->singleton('uninotify', function ($app) {
28
            return new UniNotifyService($app['config']);
29
        });
30
    }
31
32
    /**
33
     * @return array
34
     */
35
    public function provides()
36
    {
37
        return ['uninotify'];
38
    }
39
}
40