HealthServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
c 1
b 0
f 0
dl 0
loc 40
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 3 1
A setupConfig() 0 9 1
A register() 0 6 1
1
<?php
2
namespace Health\ServiceProviders;
3
4
use Illuminate\Support\ServiceProvider;
5
6
class HealthServiceProvider extends ServiceProvider
7
{
8
    /**
9
     * Boot the service provider.
10
     *
11
     * @return void
12
     */
13
    public function boot()
14
    {
15
        $this->setupConfig();
16
    }
17
18
    /**
19
     * Setup the config.
20
     *
21
     * @return void
22
     */
23
    protected function setupConfig()
24
    {
25
        $source = realpath(__DIR__ . '/../../config/health.php');
26
27
        $this->publishes([
28
            $source => config_path('health.php')
29
        ]);
30
31
        $this->mergeConfigFrom($source, 'health');
32
    }
33
34
35
    /**
36
     * Register the service provider.
37
     *
38
     * @return void
39
     */
40
    public function register()
41
    {
42
43
        // Register health command.
44
        $this->commands([
45
            'Health\Commands\HealthCommand'
46
        ]);
47
    }
48
}
49