Total Complexity | 13 |
Total Lines | 87 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class StockMovement implements StockMovementInterface |
||
12 | { |
||
13 | use TimestampableTrait; |
||
14 | |||
15 | /** @var int */ |
||
16 | protected $id; |
||
17 | |||
18 | /** @var int */ |
||
19 | protected $quantity; |
||
20 | |||
21 | /** @var ProductVariantInterface|null */ |
||
22 | protected $variant; |
||
23 | |||
24 | /** @var string */ |
||
25 | protected $variantCode; |
||
26 | |||
27 | /** @var Money */ |
||
28 | protected $price; |
||
29 | |||
30 | /** @var Money */ |
||
31 | protected $convertedPrice; |
||
32 | |||
33 | /** @var string|null */ |
||
34 | protected $reference; |
||
35 | |||
36 | public function getId(): ?int |
||
37 | { |
||
38 | return $this->id; |
||
39 | } |
||
40 | |||
41 | public function getQuantity(): ?int |
||
42 | { |
||
43 | return $this->quantity; |
||
44 | } |
||
45 | |||
46 | public function setQuantity(int $quantity): void |
||
47 | { |
||
48 | $this->quantity = $quantity; |
||
49 | } |
||
50 | |||
51 | public function getVariant(): ?ProductVariantInterface |
||
52 | { |
||
53 | return $this->variant; |
||
54 | } |
||
55 | |||
56 | public function setVariant(?ProductVariantInterface $variant): void |
||
57 | { |
||
58 | $this->variant = $variant; |
||
59 | |||
60 | if (null !== $variant) { |
||
61 | $this->variantCode = (string) $variant->getCode(); |
||
62 | } |
||
63 | } |
||
64 | |||
65 | public function getVariantCode(): ?string |
||
68 | } |
||
69 | |||
70 | public function getPrice(): ?Money |
||
71 | { |
||
72 | return $this->price; |
||
73 | } |
||
74 | |||
75 | public function setPrice(Money $price): void |
||
78 | } |
||
79 | |||
80 | public function getConvertedPrice(): ?Money |
||
81 | { |
||
82 | return $this->convertedPrice; |
||
83 | } |
||
84 | |||
85 | public function setConvertedPrice(Money $convertedPrice): void |
||
86 | { |
||
87 | $this->convertedPrice = $convertedPrice; |
||
88 | } |
||
89 | |||
90 | public function getReference(): ?string |
||
93 | } |
||
94 | |||
95 | public function setReference(?string $reference): void |
||
98 | } |
||
99 | } |
||
100 |