ExceptionMonitorServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 1
A register() 0 7 1
A provides() 0 4 1
1
<?php
2
3
namespace Adriandmitroca\LaravelExceptionMonitor;
4
5
use Adriandmitroca\LaravelExceptionMonitor\ExceptionMonitor;
6
use Illuminate\Support\ServiceProvider;
7
8
class ExceptionMonitorServiceProvider extends ServiceProvider
9
{
10
11
    /**
12
     * Perform post-registration booting of services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        $this->publishes([
19
            __DIR__ . '/../config/exception-monitor.php' => config_path('exception-monitor.php'),
20
        ]);
21
22
        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'laravel-exception-monitor');
23
    }
24
25
26
    /**
27
     * Register bindings in the container.
28
     *
29
     * @return void
30
     */
31
    public function register()
32
    {
33
        $this->mergeConfigFrom(__DIR__ . '/../config/exception-monitor.php', 'exception-monitor');
34
        $this->app->singleton('exception-monitor', function () {
35
            return new ExceptionMonitor;
36
        });
37
    }
38
39
40
    /**
41
     * Get the services provided by the provider.
42
     *
43
     * @return array
44
     */
45
    public function provides()
46
    {
47
        return [ 'exception-monitor' ];
48
    }
49
}