CartServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 2
c 2
b 0
f 2
lcom 1
cbo 3
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 6 1
1
<?php
2
3
namespace App\Http\Cart;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * To provide a Cart Solution in Laravel
9
 * Class CartServiceProvider.
10
 */
11
class CartServiceProvider extends ServiceProvider
12
{
13
    /**
14
     * Bootstrap the application services.
15
     */
16
    public function boot()
17
    {
18
        //
19
    }
20
21
    /**
22
     * Register the application services.
23
     */
24
    public function register()
25
    {
26
        $this->app->singleton(Cart::class, function ($app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
27
            return new Cart();
28
        });
29
    }
30
}
31