TicketAssigned   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Importance

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

4 Methods

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