Completed
Push — master ( b02d8f...8ce04a )
by Joachim
03:35 queued 02:18
created

PaymentLine::setVat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Loevgaard\Dandomain\Pay\PaymentRequest;
4
5
use Loevgaard\Dandomain\Pay\PaymentRequest;
6
7
class PaymentLine
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $productNumber;
13
14
    /**
15
     * @var string
16
     */
17
    protected $name;
18
19
    /**
20
     * @var int
21
     */
22
    protected $quantity;
23
24
    /**
25
     * The price excl vat
26
     *
27
     * @var float
28
     */
29
    protected $price;
30
31
    /**
32
     * This is the VAT percentage, i.e. 25 for Denmark
33
     *
34
     * @var int
35
     */
36
    protected $vat;
37
38
    /**
39
     * @var PaymentRequest
40
     */
41
    protected $payment;
42
43
    /**
44
     * @return string
45
     */
46 3
    public function getProductNumber() : string
47
    {
48 3
        return $this->productNumber;
49
    }
50
51
    /**
52
     * @param string $productNumber
53
     * @return PaymentLine
54
     */
55 6
    public function setProductNumber(string $productNumber) : self
56
    {
57 6
        $this->productNumber = $productNumber;
58 6
        return $this;
59
    }
60
61
    /**
62
     * @return string
63
     */
64 3
    public function getName() : string
65
    {
66 3
        return $this->name;
67
    }
68
69
    /**
70
     * @param string $name
71
     * @return PaymentLine
72
     */
73 6
    public function setName($name) : self
74
    {
75 6
        $this->name = $name;
76 6
        return $this;
77
    }
78
79
    /**
80
     * @return int
81
     */
82 3
    public function getQuantity() : int
83
    {
84 3
        return $this->quantity;
85
    }
86
87
    /**
88
     * @param int $quantity
89
     * @return PaymentLine
90
     */
91 6
    public function setQuantity($quantity) : self
92
    {
93 6
        $this->quantity = $quantity;
94 6
        return $this;
95
    }
96
97
    /**
98
     * @return float
99
     */
100 3
    public function getPrice() : float
101
    {
102 3
        return $this->price;
103
    }
104
105
    /**
106
     * @param float $price
107
     * @return PaymentLine
108
     */
109 6
    public function setPrice($price) : self
110
    {
111 6
        $this->price = $price;
112 6
        return $this;
113
    }
114
115
    /**
116
     * Returns the VAT percentage
117
     *
118
     * @return int
119
     */
120 3
    public function getVat() : int
121
    {
122 3
        return $this->vat;
123
    }
124
125
    /**
126
     * @param int $vat
127
     * @return PaymentLine
128
     */
129 6
    public function setVat($vat) : self
130
    {
131 6
        $this->vat = $vat;
132 6
        return $this;
133
    }
134
135
    /**
136
     * @return PaymentRequest
137
     */
138
    public function getPayment() : PaymentRequest
139
    {
140
        return $this->payment;
141
    }
142
143
    /**
144
     * @param PaymentRequest $payment
145
     * @return PaymentLine
146
     */
147 3
    public function setPayment(PaymentRequest $payment) : self
148
    {
149 3
        $this->payment = $payment;
150 3
        return $this;
151
    }
152
}
153