CartServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 2
Bugs 2 Features 0
Metric Value
c 2
b 2
f 0
dl 0
loc 14
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
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
}