| Total Complexity | 6 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class Variant |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | * |
||
| 20 | * @Id |
||
| 21 | * @Column(type="string", length=64) |
||
| 22 | */ |
||
| 23 | protected $id; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var int |
||
| 27 | * |
||
| 28 | * @Column(type="integer") |
||
| 29 | */ |
||
| 30 | protected $price; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var Product |
||
| 34 | * |
||
| 35 | * @ManyToOne(targetEntity="Product", inversedBy="products") |
||
| 36 | */ |
||
| 37 | protected $product; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $id |
||
| 41 | */ |
||
| 42 | public function __construct(string $id) |
||
| 43 | { |
||
| 44 | $this->id = $id; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public function getId(): string |
||
| 51 | { |
||
| 52 | return $this->id; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param int $price |
||
| 57 | */ |
||
| 58 | public function setPrice(int $price) |
||
| 59 | { |
||
| 60 | $this->price = $price; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return int |
||
| 65 | */ |
||
| 66 | public function getPrice(): int |
||
| 67 | { |
||
| 68 | return $this->price; |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @param Product $product |
||
| 73 | */ |
||
| 74 | public function setProduct(Product $product) |
||
| 75 | { |
||
| 76 | $this->product = $product; |
||
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @return Product |
||
| 81 | */ |
||
| 82 | public function getProduct(): Product |
||
| 85 | } |
||
| 86 | } |
||
| 87 |