Completed
Push — master ( d26d47...09d849 )
by Chris
01:05
created

ServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 2
A register() 0 7 1
1
<?php
2
3
namespace Cion\InspirationalQuotes;
4
5
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
6
use Cion\InspirationalQuotes\Console\InspirationalQuote;
7
8
class ServiceProvider extends BaseServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13
    public function boot()
14
    {
15
        if ($this->app->runningInConsole()) {
16
            $this->commands([
17
                InspirationalQuote::class,
18
            ]);
19
        }
20
    }
21
22
    /**
23
     * Register the application services.
24
     */
25
    public function register()
26
    {
27
        // Register the main class to use with the facade
28
        $this->app->singleton('inspirational-quote', function () {
29
            return new QuoteFactory;
30
        });
31
    }
32
}
33