BugNotifierServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 3

Test Coverage

Coverage 90.91%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 2
cbo 3
dl 0
loc 30
ccs 10
cts 11
cp 0.9091
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 1
A register() 0 6 1
1
<?php
2
3
namespace FlyingLuscas\BugNotifier;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class BugNotifierServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Perform post-registration booting of services.
11
     *
12
     * @return void
13
     */
14 30
    public function boot()
15
    {
16 30
        $this->mergeConfigFrom(__DIR__.'/config.php', 'bugnotifier');
17
18 30
        $this->loadViewsFrom(__DIR__.'/views', 'bugnotifier');
19
20 30
        $this->publishes([
21 30
            __DIR__.'/config.php' => config_path('bugnotifier.php'),
22 30
        ], 'config');
23 30
    }
24
25
    /**
26
     * Register bindings in the container.
27
     *
28
     * @return void
29
     */
30
    public function register()
31
    {
32 30
        $this->app->singleton('BugNotifier', function () {
33
            return new BugNotifier;
34 30
        });
35 30
    }
36
}
37