ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 7
nc 2
nop 0
dl 0
loc 14
ccs 9
cts 9
cp 1
crap 2
rs 10
c 0
b 0
f 0
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