Completed
Push — master ( 1888b0...c02007 )
by Joachim
02:45
created

PaymentLine::getQuantity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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