Completed
Pull Request — master (#29)
by ARCANEDEV
03:29
created

LaravelNotesServiceProvider::provides()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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