ServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 11 1
A register() 0 7 1
1
<?php
2
3
namespace Frowhy\Modular;
4
5
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
6
7
class ServiceProvider extends LaravelServiceProvider
8
{
9
    public function boot()
10
    {
11
        $this->publishes([
12
            dirname(__DIR__).'/config/repository.php' => config_path('repository.php'),
13
        ], 'modular-config');
14
        $this->publishes([
15
            dirname(__DIR__).'/config/modules.php' => config_path('modules.php'),
16
        ], 'modular-config');
17
        $this->publishes([
18
            dirname(__DIR__).'/stubs/example' => base_path('modules/Example'),
19
        ], 'modular-example');
20
    }
21
22
    public function register()
23
    {
24
        $this->mergeConfigFrom(
25
            dirname(__DIR__).'/config/repository.php', 'repository'
26
        );
27
        $this->mergeConfigFrom(
28
            dirname(__DIR__).'/config/modules.php', 'modules'
29
        );
30
    }
31
}
32