@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | $cart = &static::$cart[$this->id]; |
46 | 46 | |
47 | - if (! $asArray) { |
|
47 | + if (!$asArray) { |
|
48 | 48 | return $cart; |
49 | 49 | } |
50 | 50 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | { |
149 | 149 | $this->id = $identifier; |
150 | 150 | |
151 | - if (! array_key_exists($this->id, static::$cart)) { |
|
151 | + if (!array_key_exists($this->id, static::$cart)) { |
|
152 | 152 | static::$cart[$this->id] = []; |
153 | 153 | } |
154 | 154 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | if (request()->hasCookie('cart_identifier')) { |
20 | 20 | $cookie = request()->cookie('cart_identifier'); |
21 | 21 | |
22 | - if (is_string($cookie) && ! empty($cookie)) { |
|
22 | + if (is_string($cookie) && !empty($cookie)) { |
|
23 | 23 | return $cookie; |
24 | 24 | } |
25 | 25 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $this->loadViewsFrom(__DIR__.'/../resources/views', 'ecommerce'); |
36 | 36 | |
37 | 37 | if ($this->mustLoadRoute()) { |
38 | - Route::group($this->routeConfiguration(), function () { |
|
38 | + Route::group($this->routeConfiguration(), function() { |
|
39 | 39 | $this->loadRoutesFrom(__DIR__.'/routes.php'); |
40 | 40 | }); |
41 | 41 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | protected function mustLoadRoute(): bool |
45 | 45 | { |
46 | - return ! config('ecommerce.disable_default_route', false); |
|
46 | + return !config('ecommerce.disable_default_route', false); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | protected function routeConfiguration(): array |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function register(): void |
63 | 63 | { |
64 | - $this->app->singleton('cart', function () { |
|
64 | + $this->app->singleton('cart', function() { |
|
65 | 65 | return new Cart(new LaravelSession(), new LaravelCookie(), resolve('events')); |
66 | 66 | }); |
67 | 67 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $router->get('basket/{id}/remove', [EcommerceController::class, 'remove'])->name('ecommerce.cart.item.remove'); |
30 | 30 | } |
31 | 31 | |
32 | - public function index(): Factory|View|Application |
|
32 | + public function index(): Factory | View | Application |
|
33 | 33 | { |
34 | 34 | return view('ecommerce::cart'); |
35 | 35 | } |