Passed
Push — master ( 80c155...fd8971 )
by Stephen
02:50
created

HealthyServiceProvider::boot()   A

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
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
4
namespace Sfneal\Healthy\Providers;
5
6
use Illuminate\Support\Facades\Route;
7
use Illuminate\Support\ServiceProvider;
8
9
class HealthyServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap any Healthy services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        // Publish config file
19
        $this->publishes([
20
            __DIR__.'/../config/healthy.php' => base_path('config/healthy.php'),
21
        ], 'config');
22
23
        // Map health check paths
24
        Route::middleware('web')->group(base_path('routes/health.php'));
25
    }
26
27
    /**
28
     * Register any Healthy services.
29
     *
30
     * @return void
31
     */
32
    public function register()
33
    {
34
        // Load config file
35
        $this->mergeConfigFrom(__DIR__.'/../config/healthy.php', 'healthy');
36
    }
37
}
38