CartServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 0
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