| Total Complexity | 10 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class StockMovement implements StockMovementInterface |
||
| 11 | { |
||
| 12 | use TimestampableTrait; |
||
| 13 | |||
| 14 | /** @var int */ |
||
| 15 | protected $id; |
||
| 16 | |||
| 17 | /** @var int */ |
||
| 18 | protected $quantity; |
||
| 19 | |||
| 20 | /** @var ProductVariantInterface|null */ |
||
| 21 | protected $variant; |
||
| 22 | |||
| 23 | /** @var string|null */ |
||
| 24 | protected $variantCode; |
||
| 25 | |||
| 26 | /** @var string|null */ |
||
| 27 | protected $reference; |
||
| 28 | |||
| 29 | public function getId(): ?int |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getQuantity(): ?int |
||
| 35 | { |
||
| 36 | return $this->quantity; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function setQuantity(int $quantity): void |
||
| 40 | { |
||
| 41 | $this->quantity = $quantity; |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getVariant(): ?ProductVariantInterface |
||
| 45 | { |
||
| 46 | return $this->variant; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function setVariant(?ProductVariantInterface $variant): void |
||
| 50 | { |
||
| 51 | $this->variant = $variant; |
||
| 52 | |||
| 53 | if (null !== $variant) { |
||
| 54 | $this->variantCode = (string) $variant->getCode(); |
||
| 55 | } |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getVariantCode(): ?string |
||
| 61 | } |
||
| 62 | |||
| 63 | public function setVariantCode(?string $variantCode): void |
||
| 64 | { |
||
| 65 | $this->variantCode = $variantCode; |
||
| 66 | } |
||
| 67 | |||
| 68 | public function getReference(): ?string |
||
| 69 | { |
||
| 70 | return $this->reference; |
||
| 71 | } |
||
| 72 | |||
| 73 | public function setReference(?string $reference): void |
||
| 76 | } |
||
| 77 | } |
||
| 78 |