TicketCancelled::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace ConferenceTools\Tickets\Domain\Event\Ticket;
4
5
use Carnage\Cqrs\Event\EventInterface;
6
use JMS\Serializer\Annotation as Jms;
7
8
class TicketCancelled implements EventInterface
9
{
10
    /**
11
     * @Jms\Type("string")
12
     * @var string
13
     */
14
    private $id;
15
    /**
16
     * @Jms\Type("string")
17
     * @var string
18
     */
19
    private $ticketId;
20
21
    /**
22
     * TicketCancelled constructor.
23
     * @param string $id
24
     * @param string $ticketId
25
     */
26
    public function __construct(string $id, string $ticketId)
27
    {
28
        $this->id = $id;
29
        $this->ticketId = $ticketId;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getId(): string
36
    {
37
        return $this->id;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getTicketId(): string
44
    {
45
        return $this->ticketId;
46
    }
47
}
48