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

HealthyServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A boot() 0 9 1
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