HealthyServiceProvider   A
last analyzed

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
namespace Sfneal\Healthy\Providers;
4
5
use Illuminate\Support\Facades\Route;
6
use Illuminate\Support\ServiceProvider;
7
use Sfneal\Healthy\Controllers\HealthyController;
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::get(config('healthy.uri'), HealthyController::class)->name(config('healthy.route'));
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