BlogServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 2
cbo 2
dl 0
loc 67
ccs 18
cts 18
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 12 2
A provides() 0 6 1
A register() 0 16 1
1
<?php namespace Arcanesoft\Blog;
2
3
use Arcanesoft\Core\Bases\PackageServiceProvider;
4
5
/**
6
 * Class     BlogServiceProvider
7
 *
8
 * @package  Arcanesoft\Blog
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class BlogServiceProvider extends PackageServiceProvider
12
{
13
    /* -----------------------------------------------------------------
14
     |  Properties
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Package name.
20
     *
21
     * @var string
22
     */
23
    protected $package = 'blog';
24
25
    /* -----------------------------------------------------------------
26
     |  Main Methods
27
     | -----------------------------------------------------------------
28
     */
29
30
    /**
31
     * Register the service provider.
32
     */
33 102
    public function register()
34
    {
35 102
        parent::register();
36
37 102
        $this->registerConfig();
38 102
        $this->registerSidebarItems();
39
40 102
        $this->registerProviders([
41 102
            Providers\AuthorizationServiceProvider::class,
42
            Providers\EventServiceProvider::class,
43
            Providers\ViewComposerServiceProvider::class,
44
            Providers\RouteServiceProvider::class,
45
            \Arcanedev\LaravelMarkdown\LaravelMarkdownServiceProvider::class,
46
        ]);
47 102
        $this->registerConsoleServiceProvider(Providers\CommandServiceProvider::class);
48 102
    }
49
50
    /**
51
     * Boot the service provider.
52
     */
53 102
    public function boot()
54
    {
55 102
        parent::boot();
56
57
        // Publishes
58 102
        $this->publishConfig();
59 102
        $this->publishViews();
60 102
        $this->publishTranslations();
61 102
        $this->publishSidebarItems();
62
63 102
        Blog::$runsMigrations ? $this->loadMigrations() : $this->publishMigrations();
64 102
    }
65
66
    /**
67
     * Get the services provided by the provider.
68
     *
69
     * @return array
70
     */
71 3
    public function provides()
72
    {
73
        return [
74
            //
75 3
        ];
76
    }
77
}
78