Passed
Push — master ( a82f20...1c8f4a )
by Chubarov
02:59
created

CartServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 4
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 6
rs 9.4285
1
<?php
2
declare(strict_types=1);
3
4
namespace Cart\ServiceProviders;
5
6
use Cart\Kernel;
7
use Illuminate\Support\ServiceProvider;
8
9
class CartServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Register any application services.
13
     *
14
     * @return void
15
     */
16
    public function register()
17
    {
18
        $this->app->bind('cart', function () {
19
            $kernel = new Kernel();
20
            $kernel->bootstrapping();
21
            return $kernel->getStorage();
22
        });
23
    }
24
}