Passed
Push — trunk ( b31d2e...c882c4 )
by Christian
11:13 queued 12s
created

DocumentOrderEvent::getOrders()   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\Document\Event;
4
5
use Shopware\Core\Checkout\Document\Struct\DocumentGenerateOperation;
6
use Shopware\Core\Checkout\Order\OrderCollection;
7
use Shopware\Core\Framework\Context;
8
use Symfony\Contracts\EventDispatcher\Event;
9
10
/**
11
 * @package customer-order
12
 */
13
abstract class DocumentOrderEvent extends Event
14
{
15
    private OrderCollection $orders;
16
17
    /**
18
     * @var DocumentGenerateOperation[]
19
     */
20
    private array $operations;
21
22
    private Context $context;
23
24
    /**
25
     * @param DocumentGenerateOperation[] $operations
26
     */
27
    public function __construct(OrderCollection $orders, Context $context, array $operations = [])
28
    {
29
        $this->orders = $orders;
30
        $this->context = $context;
31
        $this->operations = $operations;
32
    }
33
34
    /**
35
     * @return DocumentGenerateOperation[]
36
     */
37
    public function getOperations(): array
38
    {
39
        return $this->operations;
40
    }
41
42
    public function getContext(): Context
43
    {
44
        return $this->context;
45
    }
46
47
    public function getOrders(): OrderCollection
48
    {
49
        return $this->orders;
50
    }
51
}
52