CompletePurchase::getPurchaseEmail()   A
last analyzed

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
2
/**
3
 * Created by PhpStorm.
4
 * User: imhotek
5
 * Date: 29/11/16
6
 * Time: 14:10
7
 */
8
9
namespace ConferenceTools\Tickets\Domain\Command\Ticket;
10
11
12
use Carnage\Cqrs\Command\CommandInterface;
13
use ConferenceTools\Tickets\Domain\ValueObject\Delegate;
14
15
class CompletePurchase implements CommandInterface
16
{
17
    /**
18
     * @var string
19
     */
20
    private $purchaseId;
21
22
    /**
23
     * @var Delegate[]
24
     */
25
    private $delegateInformation;
26
    /**
27
     * @var string
28
     */
29
    private $purchaseEmail;
30
31
    /**
32
     * CompletePurchase constructor.
33
     * @param string $purchaseId
34
     * @param string $purchaseEmail
35
     * @param Delegate[] ...$delegateInformation
36
     */
37
    public function __construct(string $purchaseId, string $purchaseEmail, Delegate ...$delegateInformation)
38
    {
39
        $this->purchaseId = $purchaseId;
40
        $this->delegateInformation = $delegateInformation;
41
        $this->purchaseEmail = $purchaseEmail;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getPurchaseId(): string
48
    {
49
        return $this->purchaseId;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getPurchaseEmail(): string
56
    {
57
        return $this->purchaseEmail;
58
    }
59
60
    /**
61
     * @return Delegate[]
62
     */
63
    public function getDelegateInformation(): array
64
    {
65
        return $this->delegateInformation;
66
    }
67
}