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

FlowRuleScope   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 13
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getOrder() 0 3 1
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