KataKotorServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Deogw\KataKotorLaravel\Providers;
4
5
use Deogw\KataKotorLaravel\KataKotor;
6
use Illuminate\Support\ServiceProvider;
7
8
class KataKotorServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13
    public function boot()
14
    {
15
        // Automatically apply the package configuration
16
        $this->mergeConfigFrom(realpath(__DIR__.'/../../config/config.php'), 'kata.kotor');
17
18
        // publish config
19
        if ($this->app->runningInConsole()) {
20
            $this->publishes([
21
                realpath(__DIR__.'/../../config/config.php') => config_path('kata-kotor.php'),
22
            ], 'config');
23
24
        }
25
    }
26
27
    /**
28
     * Register the application services.
29
     */
30
    public function register()
31
    {
32
33
        $this->app->bind('KataKotor', function() {
34
            return new KataKotor;
35
        });
36
    }
37
38
39
}
40