Completed
Push — master ( 89feee...d7dce4 )
by ARCANEDEV
14:12
created

LaravelNotesServiceProvider   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 41
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A boot() 0 8 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanedev\LaravelNotes;
6
7
use Arcanedev\Support\Providers\PackageServiceProvider;
8
9
/**
10
 * Class     LaravelNotesServiceProvider
11
 *
12
 * @package  Arcanedev\LaravelNotes
13
 * @author   ARCANEDEV <[email protected]>
14
 */
15
class LaravelNotesServiceProvider extends PackageServiceProvider
16
{
17
    /* -----------------------------------------------------------------
18
     |  Properties
19
     | -----------------------------------------------------------------
20
     */
21
22
    /**
23
     * Package name.
24
     *
25
     * @var string
26
     */
27
    protected $package = 'notes';
28
29
    /* -----------------------------------------------------------------
30
     |  Main Methods
31
     | -----------------------------------------------------------------
32
     */
33
34
    /**
35
     * Register the service provider.
36
     */
37 66
    public function register(): void
38
    {
39 66
        parent::register();
40
41 66
        $this->registerConfig();
42 66
    }
43
44
    /**
45
     * Boot the service provider.
46
     */
47 66
    public function boot(): void
48
    {
49 66
        if ($this->app->runningInConsole()) {
50 66
            $this->publishConfig();
51
52 66
            LaravelNotes::$publishMigrations ? $this->publishMigrations() : $this->loadMigrations();
53
        }
54 66
    }
55
}
56