ServerMonitorServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 14 1
1
<?php
2
3
namespace EricMakesStuff\ServerMonitor;
4
5
use EricMakesStuff\ServerMonitor\Commands\RunCommand;
6
use Illuminate\Support\ServiceProvider;
7
use EricMakesStuff\ServerMonitor\Helpers\ConsoleOutput;
8
9
class ServerMonitorServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     */
14
    public function boot()
15
    {
16
        $this->publishes([
17
            __DIR__.'/../config/server-monitor.php' => config_path('server-monitor.php'),
18
        ], 'config');
19
    }
20
21
    /**
22
     * Register the application services.
23
     */
24
    public function register()
25
    {
26
        $this->mergeConfigFrom(__DIR__.'/../config/server-monitor.php', 'server-monitor');
27
28
        $this->app['events']->subscribe(\EricMakesStuff\ServerMonitor\Notifications\EventHandler::class);
29
30
        $this->app->bind('command.monitor:run', RunCommand::class);
31
32
        $this->commands([
33
            'command.monitor:run',
34
        ]);
35
36
        $this->app->singleton(ConsoleOutput::class);
37
    }
38
}
39