LaravelLangServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 44
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 13 2
A boot() 0 4 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