CartServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 2 Features 0
Metric Value
cc 1
eloc 5
c 2
b 2
f 0
nc 1
nop 0
dl 0
loc 7
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
            $kernel->loadServiceProvider();
22
            return $kernel->getStorage();
23
        });
24
    }
25
}