Passed
Push — master ( 377148...23c92f )
by Andrey
17:25 queued 02:29
created

ServiceProvider::binds()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 9
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Helldar\LaravelLangPublisher;
4
5
use Helldar\LaravelLangPublisher\Console\LangInstall;
6
use Helldar\LaravelLangPublisher\Console\LangUninstall;
7
use Helldar\LaravelLangPublisher\Console\LangUpdate;
8
use Helldar\LaravelLangPublisher\Support\Config;
9
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
10
11
final class ServiceProvider extends BaseServiceProvider
12
{
13
    public function boot(): void
14
    {
15
        $this->bootPublishes();
16
        $this->bootCommands();
17
    }
18
19
    public function register(): void
20
    {
21
        $this->config();
22
    }
23
24
    protected function bootCommands(): void
25
    {
26
        $this->commands([
27
            LangInstall::class,
28
            LangUpdate::class,
29
            LangUninstall::class,
30
        ]);
31
    }
32
33
    protected function bootPublishes(): void
34
    {
35
        $this->publishes([
36
            __DIR__ . '/../config/lang-publisher.php' => $this->app->configPath('lang-publisher.php'),
37
        ], 'config');
38
    }
39
40
    protected function config(): void
41
    {
42
        $this->mergeConfigFrom(__DIR__ . '/../config/lang-publisher.php', Config::KEY);
43
    }
44
}
45