Passed
Push — trunk ( d9cd06...1ca626 )
by Christian
16:06 queued 03:18
created

FlowRuleScope::getOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Content\Flow\Rule;
4
5
use Shopware\Core\Checkout\Cart\Cart;
6
use Shopware\Core\Checkout\Cart\Rule\CartRuleScope;
7
use Shopware\Core\Checkout\Order\OrderEntity;
8
use Shopware\Core\System\SalesChannel\SalesChannelContext;
9
10
class FlowRuleScope extends CartRuleScope
11
{
12
    private OrderEntity $order;
13
14
    public function __construct(OrderEntity $order, Cart $cart, SalesChannelContext $context)
15
    {
16
        parent::__construct($cart, $context);
17
        $this->order = $order;
18
    }
19
20
    public function getOrder(): OrderEntity
21
    {
22
        return $this->order;
23
    }
24
}
25