1 | <?php |
||
11 | class Parcel |
||
12 | { |
||
13 | /** |
||
14 | * |
||
15 | * @var DateTime |
||
16 | */ |
||
17 | private $maturity; |
||
18 | |||
19 | /** |
||
20 | * |
||
21 | * @var float |
||
22 | */ |
||
23 | private $price; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | private $key; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | private $quantity; |
||
34 | |||
35 | /** |
||
36 | * Constructor |
||
37 | * |
||
38 | * @param DateTime $maturity |
||
39 | * @param float $price |
||
40 | * @param int $key |
||
41 | * @param int $quantity |
||
42 | */ |
||
43 | 13 | public function __construct( |
|
54 | |||
55 | /** |
||
56 | * @return the $maturity |
||
57 | */ |
||
58 | 1 | public function getMaturity(): DateTime |
|
62 | |||
63 | /** |
||
64 | * @param \DateTime $maturity |
||
65 | */ |
||
66 | 1 | public function setMaturity(DateTime $maturity) |
|
70 | |||
71 | /** |
||
72 | * @return the $price |
||
73 | */ |
||
74 | 1 | public function getPrice(): float |
|
78 | |||
79 | /** |
||
80 | * @param float $price |
||
81 | */ |
||
82 | 1 | public function setPrice(float $price) |
|
86 | |||
87 | /** |
||
88 | * @return int |
||
89 | */ |
||
90 | 1 | public function getKey(): int |
|
94 | |||
95 | /** |
||
96 | * @param int $key |
||
97 | */ |
||
98 | 1 | public function setKey(int $key = 0) |
|
102 | |||
103 | /** |
||
104 | * @return int |
||
105 | */ |
||
106 | 1 | public function getQuantity(): int |
|
110 | |||
111 | /** |
||
112 | * @param int $quantity |
||
113 | */ |
||
114 | 1 | public function setQuantity(int $quantity = 1) |
|
118 | } |
||
119 |