BugNotifierServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
crap 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