Total Complexity | 6 |
Total Lines | 72 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class Product extends AbstractModel |
||
12 | { |
||
13 | /** |
||
14 | * @var int $amount amount in cents of a product |
||
15 | */ |
||
16 | protected $amount; |
||
17 | |||
18 | /** |
||
19 | * @var string $description the description of the product, normally name is enough |
||
20 | */ |
||
21 | protected $description; |
||
22 | |||
23 | /** |
||
24 | * @var int $quantity number of items of this type |
||
25 | */ |
||
26 | protected $quantity; |
||
27 | |||
28 | /** |
||
29 | * @return int |
||
30 | */ |
||
31 | public function getAmount() |
||
32 | { |
||
33 | return $this->amount; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param $amount |
||
38 | * |
||
39 | * @return $this |
||
40 | */ |
||
41 | public function setAmount($amount) |
||
42 | { |
||
43 | $this->amount = $amount; |
||
44 | return $this; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getDescription() |
||
51 | { |
||
52 | return $this->description; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param string $description |
||
57 | * @return Product |
||
58 | */ |
||
59 | public function setDescription($description) |
||
60 | { |
||
61 | $this->description = $description; |
||
62 | return $this; |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @return int |
||
67 | */ |
||
68 | public function getQuantity() |
||
69 | { |
||
70 | return $this->quantity; |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * @param $quantity |
||
75 | * |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function setQuantity($quantity) |
||
83 | } |
||
84 | } |
||
85 |