Passed
Push — master ( 51a972...dacf9c )
by Christian
10:27 queued 10s
created

getSalesChannelContext()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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\Checkout\Cart\LineItem\LineItem;
7
use Shopware\Core\System\SalesChannel\SalesChannelContext;
8
use Symfony\Contracts\EventDispatcher\Event;
9
10
/**
11
 * @deprecated tag:v6.4.0 - Will implement Shopware\Core\Framework\Event\ShopwareSalesChannelEvent
12
 */
13
class LineItemQuantityChangedEvent extends Event /*implements ShopwareSalesChannelEvent*/
14
{
15
    /**
16
     * @var LineItem
17
     */
18
    protected $lineItem;
19
20
    /**
21
     * @var Cart
22
     */
23
    protected $cart;
24
25
    /**
26
     * @var SalesChannelContext
27
     */
28
    protected $context;
29
30
    public function __construct(LineItem $lineItem, Cart $cart, SalesChannelContext $context)
31
    {
32
        $this->lineItem = $lineItem;
33
        $this->cart = $cart;
34
        $this->context = $context;
35
    }
36
37
    public function getLineItem(): LineItem
38
    {
39
        return $this->lineItem;
40
    }
41
42
    public function getCart(): Cart
43
    {
44
        return $this->cart;
45
    }
46
47
    /**
48
     * @deprecated tag:v6.4.0 - Will return Shopware\Core\Framework\Context instead
49
     */
50
    public function getContext(): SalesChannelContext
51
    {
52
        return $this->context;
53
    }
54
55
    public function getSalesChannelContext(): SalesChannelContext
56
    {
57
        return $this->context;
58
    }
59
}
60