DelegateRegistered::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 4
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
4
namespace ConferenceTools\Checkin\Domain\Event\Delegate;
5
6
use Carnage\Cqrs\Event\EventInterface;
7
use ConferenceTools\Checkin\Domain\ValueObject\DelegateInfo;
8
use ConferenceTools\Checkin\Domain\ValueObject\Ticket;
9
use JMS\Serializer\Annotation as JMS;
10
11
class DelegateRegistered implements EventInterface
12
{
13
    /**
14
     * @var string
15
     * @JMS\Type("string")
16
     */
17
    private $delegateId;
18
    /**
19
     * @var DelegateInfo
20
     * @JMS\Type("ConferenceTools\Checkin\Domain\ValueObject\DelegateInfo")
21
     */
22
    private $delegateInfo;
23
    /**
24
     * @var Ticket
25
     * @JMS\Type("ConferenceTools\Checkin\Domain\ValueObject\Ticket")
26
     */
27
    private $ticket;
28
    /**
29
     * @var string
30
     * @JMS\Type("string")
31
     */
32
    private $purchaserEmail;
33
34
    public function __construct(
35
        string $delegateId,
36
        DelegateInfo $delegateInfo,
37
        Ticket $ticket,
38
        string $purchaserEmail
39
    ) {
40
        $this->delegateId = $delegateId;
41
        $this->delegateInfo = $delegateInfo;
42
        $this->ticket = $ticket;
43
        $this->purchaserEmail = $purchaserEmail;
44
    }
45
46
    public function getDelegateId(): string
47
    {
48
        return $this->delegateId;
49
    }
50
51
    public function getDelegateInfo(): DelegateInfo
52
    {
53
        return $this->delegateInfo;
54
    }
55
56
    public function getTicket(): Ticket
57
    {
58
        return $this->ticket;
59
    }
60
61
    public function getPurchaserEmail(): string
62
    {
63
        return $this->purchaserEmail;
64
    }
65
}
66