TicketReleased::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: imhotek
5
 * Date: 29/11/16
6
 * Time: 15:45
7
 */
8
9
namespace ConferenceTools\Tickets\Domain\Event\Ticket;
10
11
use JMS\Serializer\Annotation as Jms;
12
use Carnage\Cqrs\Event\EventInterface;
13
use ConferenceTools\Tickets\Domain\ValueObject\TicketType;
14
15
class TicketReleased implements EventInterface
16
{
17
    /**
18
     * @Jms\Type("string")
19
     * @var string
20
     */
21
    private $id;
22
23
    /**
24
     * @Jms\Type("ConferenceTools\Tickets\Domain\ValueObject\TicketType")
25
     * @var TicketType
26
     */
27
    private $ticketType;
28
29
    /**
30
     * @Jms\Type("string")
31
     * @var string
32
     */
33
    private $purchaseId;
34
35
    /**
36
     * TicketReleased constructor.
37
     * @param string $id
38
     * @param TicketType $ticketType
39
     */
40
    public function __construct(string $id, string $purchaseId, TicketType $ticketType)
41
    {
42
        $this->id = $id;
43
        $this->ticketType = $ticketType;
44
        $this->purchaseId = $purchaseId;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getId(): string
51
    {
52
        return $this->id;
53
    }
54
55
    /**
56
     * @return TicketType
57
     */
58
    public function getTicketType(): TicketType
59
    {
60
        return $this->ticketType;
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    public function getPurchaseId(): string
67
    {
68
        return $this->purchaseId;
69
    }
70
}