Completed
Push — master ( b55ea9...fbe04b )
by Laurens
02:21
created

InvoicePayment   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 35
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
A getOrderUuid() 0 4 1
A getInvoiceNr() 0 4 1
A getDueDate() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\IzettleApi\API\Purchase\Payment;
6
7
use DateTime;
8
use LauLamanApps\IzettleApi\API\Purchase\AbstractPayment;
9
use Money\Money;
10
use Ramsey\Uuid\UuidInterface;
11
12
final class InvoicePayment extends AbstractPayment
13
{
14
    private $orderUuid;
15
    private $invoiceNr;
16
    private $dueDate;
17
18 1
    public function __construct(
19
        UuidInterface $uuid,
20
        Money $amount,
21
        UuidInterface $orderUuid,
22
        string $invoiceNr,
23
        DateTime $dueDate
24
    ) {
25 1
        parent::__construct($uuid, $amount);
26
27 1
        $this->orderUuid = $orderUuid;
28 1
        $this->invoiceNr = $invoiceNr;
29 1
        $this->dueDate = $dueDate;
30 1
    }
31
32 1
    public function getOrderUuid(): UuidInterface
33
    {
34 1
        return $this->orderUuid;
35
    }
36
37 1
    public function getInvoiceNr(): string
38
    {
39 1
        return $this->invoiceNr;
40
    }
41
42 1
    public function getDueDate(): DateTime
43
    {
44 1
        return $this->dueDate;
45
    }
46
}
47