LaravelLangServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanedev\LaravelLang;
6
7
use Arcanedev\Support\Providers\PackageServiceProvider as ServiceProvider;
8
9
/**
10
 * Class     LaravelLangServiceProvider
11
 *
12
 * @author   ARCANEDEV <[email protected]>
13
 */
14
class LaravelLangServiceProvider extends ServiceProvider
15
{
16
    /* -----------------------------------------------------------------
17
     |  Properties
18
     | -----------------------------------------------------------------
19
     */
20
21
    /**
22
     * Package name.
23
     *
24
     * @var string
25
     */
26
    protected $package = 'laravel-lang';
27
28
    /* -----------------------------------------------------------------
29
     |  Main Methods
30
     | -----------------------------------------------------------------
31
     */
32
33
    /**
34
     * Register the service provider.
35
     */
36 174
    public function register(): void
37
    {
38 174
        parent::register();
39
40 174
        $this->registerConfig();
41
42 174
        if ($this->app->runningInConsole()) {
43 174
            $this->commands([
44 87
                Commands\CheckCommand::class,
45
                Commands\PublishCommand::class,
46
            ]);
47
        }
48 174
    }
49
50
    /**
51
     * Boot the service provider.
52
     */
53 174
    public function boot(): void
54
    {
55 174
        $this->publishConfig();
56 174
    }
57
}
58