Completed
Push — master ( 0d9cfe...073f2f )
by Joachim
12:30
created

OrderLine   A

Complexity

Total Complexity 13

Size/Duplication

Total Lines 160
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 13
lcom 0
cbo 0
dl 0
loc 160
rs 10
c 0
b 0
f 0

13 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A getProductNumber() 0 4 1
A setProductNumber() 0 5 1
A getName() 0 4 1
A setName() 0 5 1
A getQuantity() 0 4 1
A setQuantity() 0 5 1
A getPrice() 0 4 1
A setPrice() 0 5 1
A getVat() 0 4 1
A setVat() 0 5 1
A getPayment() 0 4 1
A setPayment() 0 5 1
1
<?php
2
namespace Loevgaard\DandomainAltapayBundle\Entity;
3
4
use Doctrine\ORM\Mapping AS ORM;
5
6
/**
7
 * @ORM\MappedSuperclass
8
 */
9
abstract class OrderLine implements OrderLineInterface
10
{
11
    /**
12
     * @var mixed
13
     */
14
    protected $id;
15
16
    /**
17
     * @var string
18
     *
19
     * @ORM\Column(type="string")
20
     */
21
    protected $productNumber;
22
23
    /**
24
     * @var string
25
     *
26
     * @ORM\Column(type="string")
27
     */
28
    protected $name;
29
30
    /**
31
     * @var int
32
     *
33
     * @ORM\Column(type="integer")
34
     */
35
    protected $quantity;
36
37
    /**
38
     * The price excl vat
39
     *
40
     * @var float
41
     *
42
     * @ORM\Column(type="decimal", scale=2, precision=10)
43
     */
44
    protected $price;
45
46
    /**
47
     * @var int
48
     *
49
     * @ORM\Column(type="integer")
50
     */
51
    protected $vat;
52
53
    /**
54
     * @var PaymentInterface
55
     */
56
    protected $payment;
57
58
    /**
59
     * @inheritdoc
60
     */
61
    public function getId()
62
    {
63
        return $this->id;
64
    }
65
66
    /**
67
     * @inheritdoc
68
     */
69
    public function getProductNumber() : string
70
    {
71
        return $this->productNumber;
72
    }
73
74
    /**
75
     * @inheritdoc
76
     */
77
    public function setProductNumber(string $productNumber) : OrderLineInterface
78
    {
79
        $this->productNumber = $productNumber;
80
        return $this;
81
    }
82
83
    /**
84
     * @inheritdoc
85
     */
86
    public function getName() : string
87
    {
88
        return $this->name;
89
    }
90
91
    /**
92
     * @inheritdoc
93
     */
94
    public function setName(string $name) : OrderLineInterface
95
    {
96
        $this->name = $name;
97
        return $this;
98
    }
99
100
    /**
101
     * @inheritdoc
102
     */
103
    public function getQuantity() : int
104
    {
105
        return $this->quantity;
106
    }
107
108
    /**
109
     * @inheritdoc
110
     */
111
    public function setQuantity(int $quantity) : OrderLineInterface
112
    {
113
        $this->quantity = $quantity;
114
        return $this;
115
    }
116
117
    /**
118
     * @inheritdoc
119
     */
120
    public function getPrice() : float
121
    {
122
        return $this->price;
123
    }
124
125
    /**
126
     * @inheritdoc
127
     */
128
    public function setPrice(float $price) : OrderLineInterface
129
    {
130
        $this->price = $price;
131
        return $this;
132
    }
133
134
    /**
135
     * @inheritdoc
136
     */
137
    public function getVat() : int
138
    {
139
        return $this->vat;
140
    }
141
142
    /**
143
     * @inheritdoc
144
     */
145
    public function setVat(int $vat) : OrderLineInterface
146
    {
147
        $this->vat = $vat;
148
        return $this;
149
    }
150
151
    /**
152
     * @inheritdoc
153
     */
154
    public function getPayment(): PaymentInterface
155
    {
156
        return $this->payment;
157
    }
158
159
    /**
160
     * @inheritdoc
161
     */
162
    public function setPayment(PaymentInterface $payment): OrderLineInterface
163
    {
164
        $this->payment = $payment;
165
        return $this;
166
    }
167
168
}