1 | <?php |
||
27 | class CartItem extends \Eccube\Entity\AbstractEntity implements ItemInterface |
||
28 | { |
||
29 | use PointRateTrait; |
||
30 | |||
31 | /** |
||
32 | * @var integer |
||
33 | * |
||
34 | * @ORM\Column(name="id", type="bigint", options={"unsigned":true}) |
||
35 | * @ORM\Id |
||
36 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
37 | */ |
||
38 | private $id; |
||
|
|||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | * |
||
43 | * @ORM\Column(name="price", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0}) |
||
44 | */ |
||
45 | private $price = 0; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | * |
||
50 | * @ORM\Column(name="quantity", type="decimal", precision=10, scale=0, options={"unsigned":true,"default":0}) |
||
51 | */ |
||
52 | private $quantity = 0; |
||
53 | |||
54 | /** |
||
55 | * @var \Eccube\Entity\ProductClass |
||
56 | * |
||
57 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\ProductClass") |
||
58 | * @ORM\JoinColumns({ |
||
59 | * @ORM\JoinColumn(name="product_class_id", referencedColumnName="id") |
||
60 | * }) |
||
61 | */ |
||
62 | private $ProductClass; |
||
63 | |||
64 | /** |
||
65 | * @var \Eccube\Entity\Cart |
||
66 | * |
||
67 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Cart", inversedBy="CartItems") |
||
68 | * @ORM\JoinColumns({ |
||
69 | * @ORM\JoinColumn(name="cart_id", referencedColumnName="id", onDelete="CASCADE") |
||
70 | * }) |
||
71 | */ |
||
72 | private $Cart; |
||
73 | |||
74 | /** |
||
75 | * sessionのシリアライズのために使われる |
||
76 | * |
||
77 | * @var int |
||
78 | */ |
||
79 | private $product_class_id; |
||
80 | |||
81 | public function __sleep() |
||
85 | |||
86 | /** |
||
87 | * @param integer $price |
||
88 | * |
||
89 | * @return CartItem |
||
90 | */ |
||
91 | 92 | public function setPrice($price) |
|
97 | |||
98 | /** |
||
99 | * @return string |
||
100 | */ |
||
101 | 82 | public function getPrice() |
|
105 | |||
106 | /** |
||
107 | * @param integer $quantity |
||
108 | * |
||
109 | * @return CartItem |
||
110 | */ |
||
111 | 95 | public function setQuantity($quantity) |
|
117 | |||
118 | /** |
||
119 | * @return string |
||
120 | */ |
||
121 | 91 | public function getQuantity() |
|
125 | |||
126 | /** |
||
127 | * @return integer |
||
128 | */ |
||
129 | 16 | public function getTotalPrice() |
|
133 | |||
134 | /** |
||
135 | * 商品明細かどうか. |
||
136 | * |
||
137 | * @return boolean 商品明細の場合 true |
||
138 | */ |
||
139 | 89 | public function isProduct() |
|
143 | |||
144 | /** |
||
145 | * 送料明細かどうか. |
||
146 | * |
||
147 | * @return boolean 送料明細の場合 true |
||
148 | */ |
||
149 | 78 | public function isDeliveryFee() |
|
153 | |||
154 | /** |
||
155 | * 手数料明細かどうか. |
||
156 | * |
||
157 | * @return boolean 手数料明細の場合 true |
||
158 | */ |
||
159 | 78 | public function isCharge() |
|
163 | |||
164 | /** |
||
165 | * 値引き明細かどうか. |
||
166 | * |
||
167 | * @return boolean 値引き明細の場合 true |
||
168 | */ |
||
169 | 78 | public function isDiscount() |
|
173 | |||
174 | /** |
||
175 | * 税額明細かどうか. |
||
176 | * |
||
177 | * @return boolean 税額明細の場合 true |
||
178 | */ |
||
179 | public function isTax() |
||
183 | |||
184 | 18 | public function getOrderItemType() |
|
191 | |||
192 | /** |
||
193 | * @param ProductClass $ProductClass |
||
194 | * |
||
195 | * @return $this |
||
196 | */ |
||
197 | 110 | public function setProductClass(ProductClass $ProductClass) |
|
206 | |||
207 | /** |
||
208 | * @return ProductClass |
||
209 | */ |
||
210 | 102 | public function getProductClass() |
|
214 | |||
215 | /** |
||
216 | * @return int|null |
||
217 | */ |
||
218 | 37 | public function getProductClassId() |
|
222 | |||
223 | 79 | public function getPriceIncTax() |
|
228 | |||
229 | /** |
||
230 | * @return Cart |
||
231 | */ |
||
232 | public function getCart() |
||
236 | |||
237 | /** |
||
238 | * @param Cart $Cart |
||
239 | */ |
||
240 | 87 | public function setCart(Cart $Cart) |
|
244 | } |
||
245 |
This check marks private properties in classes that are never used. Those properties can be removed.