ExceptionMonitorServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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
}