ConfigurationServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Hyde\Foundation\Providers;
6
7
use Illuminate\Support\ServiceProvider;
8
9
use function config_path;
10
11
class ConfigurationServiceProvider extends ServiceProvider
12
{
13
    public function register(): void
14
    {
15
        $this->mergeConfigFrom(__DIR__.'/../../../config/hyde.php', 'hyde');
16
        $this->mergeConfigFrom(__DIR__.'/../../../config/docs.php', 'docs');
17
        $this->mergeConfigFrom(__DIR__.'/../../../config/markdown.php', 'markdown');
18
    }
19
20
    public function boot(): void
21
    {
22
        $this->publishes([
23
            __DIR__.'/../../../config' => config_path(),
24
        ], 'configs');
25
26
        $this->publishes([
27
            __DIR__.'/../../../config/hyde.php' => config_path('hyde.php'),
28
            __DIR__.'/../../../config/docs.php' => config_path('docs.php'),
29
            __DIR__.'/../../../config/markdown.php' => config_path('markdown.php'),
30
        ], 'hyde-configs');
31
32
        $this->publishes([
33
            __DIR__.'/../../../config/view.php' => config_path('view.php'),
34
            __DIR__.'/../../../config/cache.php' => config_path('cache.php'),
35
            __DIR__.'/../../../config/commands.php' => config_path('commands.php'),
36
            __DIR__.'/../../../config/torchlight.php' => config_path('torchlight.php'),
37
        ], 'support-configs');
38
    }
39
}
40