ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 22
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 14 2
A register() 0 3 1
1
<?php
2
3
namespace QuickCheckout;
4
5
class ServiceProvider extends \Illuminate\Support\ServiceProvider
6
{
7 11
    public function boot()
8
    {
9 11
        if ($this->app->runningInConsole()) {
10 11
            $this->publishes([
11 11
                __DIR__ . '/../config/quick-checkout.php' => config_path('quick-checkout.php'),
12 11
            ], 'config');
13
14 11
            $this->commands([
15
                //
16 11
            ]);
17
        }
18
19 11
        $this->app->bind('quick-checkout', function ($app) {
20 5
            return new CheckoutManager($app);
21 11
        });
22 11
    }
23
24 11
    public function register()
25
    {
26 11
        $this->mergeConfigFrom(__DIR__ . '/../config/quick-checkout.php', 'quick-checkout');
27 11
    }
28
}
29