Completed
Push — master ( a19a47...15bbc5 )
by Arjay
15:59
created

WidgetServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 7 1
1
<?php
2
3
namespace Yajra\CMS\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use Yajra\CMS\Console\WidgetMakeCommand;
7
use Yajra\CMS\Console\WidgetPublishCommand;
8
9
class WidgetServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        $this->commands(WidgetPublishCommand::class);
19
    }
20
21
    /**
22
     * Register the application services.
23
     *
24
     * @return void
25
     */
26
    public function register()
27
    {
28
        // override arrilot widget command.
29
        $this->app->singleton('command.widget.make', function ($app) {
30
            return new WidgetMakeCommand($app['files']);
31
        });
32
    }
33
}
34