Test Failed
Push — main ( c425e9...d8c3bc )
by Vasil
03:17
created

CODPayment::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Model;
6
7
use DateTime;
8
use JMS\Serializer\Annotation as Serializer;
9
use VasilDakov\Speedy\ToArray;
10
11
/**
12
 * Class CODPayment
13
 *
14
 * @Serializer\AccessType("public_method")
15
 * @author Vasil Dakov <[email protected]>
16
 * @author Valentin Valkanov <[email protected]>
17
 * @copyright
18
 * @version 1.0
19
 * @psalm-suppress MissingConstructor
20
 */
21
class CODPayment
22
{
23
    use ToArray;
24
25
    /**
26
     * @var DateTime
27
     * @Serializer\Type("DateTime<'Y-m-d\TH:i:sP'>")
28
     */
29
    private DateTime $date;
30
31
    /**
32
     * @var float
33
     * @Serializer\Type("float")
34
     */
35
    private float $totalPayedOutAmount;
36 2
37
    /**
38 2
     * @return DateTime
39
     */
40
    public function getDate(): DateTime
41
    {
42
        return $this->date;
43
    }
44 3
45
    /**
46 3
     * @param DateTime $date
47
     */
48
    public function setDate(DateTime $date): void
49
    {
50
        $this->date = $date;
51
    }
52 2
53
    /**
54 2
     * @return float
55
     */
56
    public function getTotalPayedOutAmount(): float
57
    {
58
        return $this->totalPayedOutAmount;
59
    }
60 3
61
    /**
62 3
     * @param float $totalPayedOutAmount
63
     */
64
    public function setTotalPayedOutAmount(float $totalPayedOutAmount): void
65 1
    {
66
        $this->totalPayedOutAmount = $totalPayedOutAmount;
67 1
    }
68
}
69