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

CartDeletedEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getSalesChannelContext() 0 3 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\System\SalesChannel\SalesChannelContext;
6
use Symfony\Contracts\EventDispatcher\Event;
7
8
/**
9
 * @deprecated tag:v6.4.0 - Will implement Shopware\Core\Framework\Event\ShopwareSalesChannelEvent
10
 */
11
class CartDeletedEvent extends Event /*implements ShopwareSalesChannelEvent*/
12
{
13
    /**
14
     * @var SalesChannelContext
15
     */
16
    protected $context;
17
18
    public function __construct(SalesChannelContext $context)
19
    {
20
        $this->context = $context;
21
    }
22
23
    /**
24
     * @deprecated tag:v6.4.0 - Will return Shopware\Core\Framework\Context instead
25
     */
26
    public function getContext(): SalesChannelContext
27
    {
28
        return $this->context;
29
    }
30
31
    public function getSalesChannelContext(): SalesChannelContext
32
    {
33
        return $this->context;
34
    }
35
}
36