TicketReserved   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 55
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPurchaseId() 0 3 1
A __construct() 0 5 1
A getTicketType() 0 3 1
A getId() 0 3 1
1
<?php
2
3
namespace ConferenceTools\Tickets\Domain\Event\Ticket;
4
5
use Carnage\Cqrs\Event\EventInterface;
6
use ConferenceTools\Tickets\Domain\ValueObject\TicketType;
7
use JMS\Serializer\Annotation as Jms;
8
9
class TicketReserved implements EventInterface
10
{
11
    /**
12
     * @Jms\Type("string")
13
     * @var string
14
     */
15
    private $id;
16
17
    /**
18
     * @Jms\Type("ConferenceTools\Tickets\Domain\ValueObject\TicketType")
19
     * @var TicketType
20
     */
21
    private $ticketType;
22
23
    /**
24
     * @Jms\Type("string")
25
     * @var string
26
     */
27
    private $purchaseId;
28
29
    /**
30
     * TicketReserved constructor.
31
     * @param string $id
32
     * @param TicketType $ticketType
33
     * @param string $purchaseId
34
     */
35
    public function __construct(string $id, TicketType $ticketType, string $purchaseId)
36
    {
37
        $this->id = $id;
38
        $this->ticketType = $ticketType;
39
        $this->purchaseId = $purchaseId;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getId()
46
    {
47
        return $this->id;
48
    }
49
50
    /**
51
     * @return TicketType
52
     */
53
    public function getTicketType()
54
    {
55
        return $this->ticketType;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getPurchaseId()
62
    {
63
        return $this->purchaseId;
64
    }
65
}