| Total Complexity | 12 |
| Total Lines | 126 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Product |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var Store |
||
| 9 | */ |
||
| 10 | protected $store; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var Variant[] |
||
| 14 | */ |
||
| 15 | protected $variants = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var Category |
||
| 19 | */ |
||
| 20 | protected $category; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $id; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var bool |
||
| 29 | */ |
||
| 30 | protected $approved; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | protected $name; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return Store |
||
| 39 | */ |
||
| 40 | public function getStore(): Store |
||
| 41 | { |
||
| 42 | return $this->store; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param Store $store |
||
| 47 | */ |
||
| 48 | public function setStore(Store $store) |
||
| 49 | { |
||
| 50 | $this->store = $store; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return Variant[] |
||
| 55 | */ |
||
| 56 | public function getVariants(): array |
||
| 57 | { |
||
| 58 | return $this->variants; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @param Variant $variant |
||
| 63 | */ |
||
| 64 | public function addVariant(Variant $variant) |
||
| 65 | { |
||
| 66 | $this->variants[] = $variant; |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getId(): string |
||
| 73 | { |
||
| 74 | return $this->id; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @param string $id |
||
| 79 | */ |
||
| 80 | public function setId(string $id) |
||
| 81 | { |
||
| 82 | $this->id = $id; |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @return bool |
||
| 87 | */ |
||
| 88 | public function isApproved(): bool |
||
| 89 | { |
||
| 90 | return $this->approved; |
||
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * @param bool $approved |
||
| 95 | */ |
||
| 96 | public function setApproved(bool $approved) |
||
| 97 | { |
||
| 98 | $this->approved = $approved; |
||
| 99 | } |
||
| 100 | |||
| 101 | /** |
||
| 102 | * @return string |
||
| 103 | */ |
||
| 104 | public function getName(): string |
||
| 105 | { |
||
| 106 | return $this->name; |
||
| 107 | } |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @param string $name |
||
| 111 | */ |
||
| 112 | public function setName(string $name) |
||
| 113 | { |
||
| 114 | $this->name = $name; |
||
| 115 | } |
||
| 116 | |||
| 117 | /** |
||
| 118 | * @return Category |
||
| 119 | */ |
||
| 120 | public function getCategory(): Category |
||
| 121 | { |
||
| 122 | return $this->category; |
||
| 123 | } |
||
| 124 | |||
| 125 | /** |
||
| 126 | * @param Category $category |
||
| 127 | */ |
||
| 128 | public function setCategory(Category $category) |
||
| 131 | } |
||
| 132 | } |
||
| 133 |