Passed
Push — master ( 7a2782...032b3c )
by Christian
11:03
created

CartMergedEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 26
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCart() 0 3 1
A __construct() 0 4 1
A getContext() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Checkout\Cart\Event;
4
5
use Shopware\Core\Checkout\Cart\Cart;
6
use Shopware\Core\System\SalesChannel\SalesChannelContext;
7
use Symfony\Contracts\EventDispatcher\Event;
8
9
class CartMergedEvent extends Event
10
{
11
    /**
12
     * @var Cart
13
     */
14
    protected $cart;
15
16
    /**
17
     * @var SalesChannelContext
18
     */
19
    protected $context;
20
21
    public function __construct(Cart $cart, SalesChannelContext $context)
22
    {
23
        $this->cart = $cart;
24
        $this->context = $context;
25
    }
26
27
    public function getCart(): Cart
28
    {
29
        return $this->cart;
30
    }
31
32
    public function getContext(): SalesChannelContext
33
    {
34
        return $this->context;
35
    }
36
}
37