TicketPurchaseTotalPriceCalculated::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: imhotek
5
 * Date: 28/11/16
6
 * Time: 18:21
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\Money;
14
use ConferenceTools\Tickets\Domain\ValueObject\Price;
15
16
class TicketPurchaseTotalPriceCalculated implements EventInterface
17
{
18
    /**
19
     * @Jms\Type("string")
20
     * @var string
21
     */
22
    private $id;
23
24
    /**
25
     * @var Price
26
     * @Jms\Type("ConferenceTools\Tickets\Domain\ValueObject\Price")
27
     */
28
    private $total;
29
30
    /**
31
     * TicketPurchaseTotalPriceCalculated constructor.
32
     * @param string $id
33
     * @param Money $total
34
     */
35
    public function __construct(string $id, Price $total)
36
    {
37
        $this->id = $id;
38
        $this->total = $total;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getId(): string
45
    {
46
        return $this->id;
47
    }
48
49
    /**
50
     * @return Price
51
     */
52
    public function getTotal(): Price
53
    {
54
        return $this->total;
55
    }
56
}