RouteViewerServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 2

Importance

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