Passed
Push — trunk ( 5b7d3d...2a754e )
by Christian
12:07 queued 12s
created

CartLoadedEvent::getCart()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
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\Framework\Log\Package;
7
use Shopware\Core\System\SalesChannel\SalesChannelContext;
8
use Symfony\Contracts\EventDispatcher\Event;
9
10
#[Package('checkout')]
11
class CartLoadedEvent extends Event
12
{
13
    /**
14
     * @internal
15
     */
16
    public function __construct(
17
        protected readonly Cart $cart,
18
        protected readonly SalesChannelContext $salesChannelContext,
19
    ) {
20
    }
21
22
    public function getCart(): Cart
23
    {
24
        return $this->cart;
25
    }
26
27
    public function getSalesChannelContext(): SalesChannelContext
28
    {
29
        return $this->salesChannelContext;
30
    }
31
}
32