HealthServiceProvider::setupConfig()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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