BuyableServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
ccs 6
cts 6
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace UniSharp\Buyable\Providers;
3
4
use UniSharp\Buyable\Models\Spec;
5
use UniSharp\Buyable\Models\Buyable;
6
use Illuminate\Support\ServiceProvider;
7
use UniSharp\Buyable\Contracts\ProductUnitContract;
8
use UniSharp\Buyable\Contracts\BuyableModelContract;
9
10
class BuyableServiceProvider extends ServiceProvider
11
{
12 22
    public function boot()
13
    {
14 22
        $this->loadMigrationsFrom(
15 22
            __DIR__.'/../../database/migrations'
16
        );
17 22
        $this->app->bind(ProductUnitContract::class, Spec::class);
18 22
        $this->app->bind(BuyableModelContract::class, Buyable::class);
19 22
    }
20
}
21