Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like Shipping often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Shipping, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 30 | class Shipping extends \Eccube\Entity\AbstractEntity |
||
| 31 | { |
||
| 32 | 26 | public function getShippingMultipleDefaultName() |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @var int |
||
| 39 | * |
||
| 40 | * @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
||
| 41 | * @ORM\Id |
||
| 42 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
| 43 | */ |
||
| 44 | private $id; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @var string |
||
| 48 | * |
||
| 49 | * @ORM\Column(name="name01", type="string", length=255) |
||
| 50 | */ |
||
| 51 | private $name01; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @var string |
||
| 55 | * |
||
| 56 | * @ORM\Column(name="name02", type="string", length=255) |
||
| 57 | */ |
||
| 58 | private $name02; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @var string |
||
| 62 | * |
||
| 63 | * @ORM\Column(name="kana01", type="string", length=255) |
||
| 64 | */ |
||
| 65 | private $kana01; |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @var string |
||
| 69 | * |
||
| 70 | * @ORM\Column(name="kana02", type="string", length=255) |
||
| 71 | */ |
||
| 72 | private $kana02; |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @var string|null |
||
| 76 | * |
||
| 77 | * @ORM\Column(name="company_name", type="string", length=255, nullable=true) |
||
| 78 | */ |
||
| 79 | private $company_name; |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @var string|null |
||
| 83 | * |
||
| 84 | * @ORM\Column(name="phone_number", type="string", length=14, nullable=true) |
||
| 85 | */ |
||
| 86 | private $phone_number; |
||
| 87 | |||
| 88 | /** |
||
| 89 | * @var string|null |
||
| 90 | * |
||
| 91 | * @ORM\Column(name="postal_code", type="string", length=8, nullable=true) |
||
| 92 | */ |
||
| 93 | private $postal_code; |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @var string|null |
||
| 97 | * |
||
| 98 | * @ORM\Column(name="addr01", type="string", length=255, nullable=true) |
||
| 99 | */ |
||
| 100 | private $addr01; |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @var string|null |
||
| 104 | * |
||
| 105 | * @ORM\Column(name="addr02", type="string", length=255, nullable=true) |
||
| 106 | */ |
||
| 107 | private $addr02; |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @var string|null |
||
| 111 | * |
||
| 112 | * @ORM\Column(name="delivery_name", type="string", length=255, nullable=true) |
||
| 113 | */ |
||
| 114 | private $shipping_delivery_name; |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @var int |
||
| 118 | * |
||
| 119 | * @ORM\Column(name="time_id", type="integer", options={"unsigned":true}, nullable=true) |
||
| 120 | */ |
||
| 121 | private $time_id; |
||
| 122 | |||
| 123 | /** |
||
| 124 | * @var int |
||
| 125 | * |
||
| 126 | * @ORM\Column(name="fee_id", type="integer", options={"unsigned":true}, nullable=true) |
||
| 127 | */ |
||
| 128 | private $fee_id; |
||
| 129 | |||
| 130 | /** |
||
| 131 | * @var string|null |
||
| 132 | * |
||
| 133 | * @ORM\Column(name="delivery_time", type="string", length=255, nullable=true) |
||
| 134 | */ |
||
| 135 | private $shipping_delivery_time; |
||
| 136 | |||
| 137 | /** |
||
| 138 | * お届け予定日/お届け希望日 |
||
| 139 | * |
||
| 140 | * @var \DateTime|null |
||
| 141 | * |
||
| 142 | * @ORM\Column(name="delivery_date", type="datetimetz", nullable=true) |
||
| 143 | */ |
||
| 144 | private $shipping_delivery_date; |
||
| 145 | |||
| 146 | /** |
||
| 147 | * @var string|null |
||
| 148 | * |
||
| 149 | * @ORM\Column(name="delivery_fee", type="decimal", precision=12, scale=2, nullable=true, options={"unsigned":true,"default":0}) |
||
| 150 | */ |
||
| 151 | private $shipping_delivery_fee = 0; |
||
| 152 | |||
| 153 | /** |
||
| 154 | * 出荷日 |
||
| 155 | * |
||
| 156 | * @var \DateTime|null |
||
| 157 | * |
||
| 158 | * @ORM\Column(name="shipping_date", type="datetimetz", nullable=true) |
||
| 159 | */ |
||
| 160 | private $shipping_date; |
||
| 161 | |||
| 162 | /** |
||
| 163 | * @var string |
||
| 164 | * |
||
| 165 | * @ORM\Column(name="tracking_number", type="string", length=255, nullable=true) |
||
| 166 | */ |
||
| 167 | private $tracking_number; |
||
| 168 | |||
| 169 | /** |
||
| 170 | * @var string |
||
| 171 | * |
||
| 172 | * @ORM\Column(name="note", type="string", length=4000, nullable=true) |
||
| 173 | */ |
||
| 174 | private $note; |
||
| 175 | |||
| 176 | /** |
||
| 177 | * @var int|null |
||
| 178 | * |
||
| 179 | * @ORM\Column(name="sort_no", type="smallint", nullable=true, options={"unsigned":true}) |
||
| 180 | */ |
||
| 181 | private $sort_no; |
||
| 182 | |||
| 183 | /** |
||
| 184 | * @var \DateTime |
||
| 185 | * |
||
| 186 | * @ORM\Column(name="create_date", type="datetimetz") |
||
| 187 | */ |
||
| 188 | private $create_date; |
||
| 189 | |||
| 190 | /** |
||
| 191 | * @var \DateTime |
||
| 192 | * |
||
| 193 | * @ORM\Column(name="update_date", type="datetimetz") |
||
| 194 | */ |
||
| 195 | private $update_date; |
||
| 196 | |||
| 197 | /** |
||
| 198 | * @var \Doctrine\Common\Collections\Collection |
||
| 199 | * |
||
| 200 | * @ORM\OneToMany(targetEntity="Eccube\Entity\OrderItem", mappedBy="Shipping", cascade={"persist"}) |
||
| 201 | */ |
||
| 202 | private $OrderItems; |
||
| 203 | |||
| 204 | /** |
||
| 205 | * @var \Eccube\Entity\Master\Country |
||
| 206 | * |
||
| 207 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country") |
||
| 208 | * @ORM\JoinColumns({ |
||
| 209 | * @ORM\JoinColumn(name="country_id", referencedColumnName="id") |
||
| 210 | * }) |
||
| 211 | */ |
||
| 212 | private $Country; |
||
| 213 | |||
| 214 | /** |
||
| 215 | * @var \Eccube\Entity\Master\Pref |
||
| 216 | * |
||
| 217 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref") |
||
| 218 | * @ORM\JoinColumns({ |
||
| 219 | * @ORM\JoinColumn(name="pref_id", referencedColumnName="id") |
||
| 220 | * }) |
||
| 221 | */ |
||
| 222 | private $Pref; |
||
| 223 | |||
| 224 | /** |
||
| 225 | * @var \Eccube\Entity\Delivery |
||
| 226 | * |
||
| 227 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Delivery") |
||
| 228 | * @ORM\JoinColumns({ |
||
| 229 | * @ORM\JoinColumn(name="delivery_id", referencedColumnName="id") |
||
| 230 | * }) |
||
| 231 | */ |
||
| 232 | private $Delivery; |
||
| 233 | |||
| 234 | /** |
||
| 235 | * @var \Doctrine\Common\Collections\Collection |
||
| 236 | */ |
||
| 237 | private $Orders; |
||
|
|
|||
| 238 | |||
| 239 | /** |
||
| 240 | * @var \Eccube\Entity\ProductClass |
||
| 241 | */ |
||
| 242 | private $ProductClassOfTemp; |
||
| 243 | |||
| 244 | /** |
||
| 245 | * @var \Eccube\Entity\Master\ShippingStatus |
||
| 246 | * |
||
| 247 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\ShippingStatus") |
||
| 248 | * @ORM\JoinColumns({ |
||
| 249 | * @ORM\JoinColumn(name="shipping_status_id", referencedColumnName="id") |
||
| 250 | * }) |
||
| 251 | */ |
||
| 252 | private $ShippingStatus; |
||
| 253 | |||
| 254 | /** |
||
| 255 | * @var \Eccube\Entity\Member |
||
| 256 | * |
||
| 257 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member") |
||
| 258 | * @ORM\JoinColumns({ |
||
| 259 | * @ORM\JoinColumn(name="creator_id", referencedColumnName="id") |
||
| 260 | * }) |
||
| 261 | */ |
||
| 262 | private $Creator; |
||
| 263 | |||
| 264 | /** |
||
| 265 | * Constructor |
||
| 266 | */ |
||
| 267 | 195 | public function __construct() |
|
| 271 | |||
| 272 | /** |
||
| 273 | * CustomerAddress から個人情報を設定. |
||
| 274 | * |
||
| 275 | * @param \Eccube\Entity\CustomerAddress $CustomerAddress |
||
| 276 | * |
||
| 277 | * @return \Eccube\Entity\Shipping |
||
| 278 | */ |
||
| 279 | 25 | View Code Duplication | public function setFromCustomerAddress(CustomerAddress $CustomerAddress) |
| 295 | |||
| 296 | /** |
||
| 297 | * 個人情報をクリア. |
||
| 298 | * |
||
| 299 | * @return \Eccube\Entity\Shipping |
||
| 300 | */ |
||
| 301 | public function clearCustomerAddress() |
||
| 317 | |||
| 318 | /** |
||
| 319 | * Get id. |
||
| 320 | * |
||
| 321 | * @return int |
||
| 322 | */ |
||
| 323 | 79 | public function getId() |
|
| 327 | |||
| 328 | /** |
||
| 329 | * Set name01. |
||
| 330 | * |
||
| 331 | * @param string $name01 |
||
| 332 | * |
||
| 333 | * @return Shipping |
||
| 334 | */ |
||
| 335 | 66 | public function setName01($name01) |
|
| 341 | |||
| 342 | /** |
||
| 343 | * Get name01. |
||
| 344 | * |
||
| 345 | * @return string |
||
| 346 | */ |
||
| 347 | 66 | public function getName01() |
|
| 351 | |||
| 352 | /** |
||
| 353 | * Set name02. |
||
| 354 | * |
||
| 355 | * @param string $name02 |
||
| 356 | * |
||
| 357 | * @return Shipping |
||
| 358 | */ |
||
| 359 | 54 | public function setName02($name02) |
|
| 365 | |||
| 366 | /** |
||
| 367 | * Get name02. |
||
| 368 | * |
||
| 369 | * @return string |
||
| 370 | */ |
||
| 371 | 64 | public function getName02() |
|
| 375 | |||
| 376 | /** |
||
| 377 | * Set kana01. |
||
| 378 | * |
||
| 379 | * @param string $kana01 |
||
| 380 | * |
||
| 381 | * @return Shipping |
||
| 382 | */ |
||
| 383 | 54 | public function setKana01($kana01) |
|
| 389 | |||
| 390 | /** |
||
| 391 | * Get kana01. |
||
| 392 | * |
||
| 393 | * @return string |
||
| 394 | */ |
||
| 395 | 61 | public function getKana01() |
|
| 399 | |||
| 400 | /** |
||
| 401 | * Set kana02. |
||
| 402 | * |
||
| 403 | * @param string $kana02 |
||
| 404 | * |
||
| 405 | * @return Shipping |
||
| 406 | */ |
||
| 407 | 52 | public function setKana02($kana02) |
|
| 413 | |||
| 414 | /** |
||
| 415 | * Get kana02. |
||
| 416 | * |
||
| 417 | * @return string |
||
| 418 | */ |
||
| 419 | 60 | public function getKana02() |
|
| 423 | |||
| 424 | /** |
||
| 425 | * Set companyName. |
||
| 426 | * |
||
| 427 | * @param string|null $companyName |
||
| 428 | * |
||
| 429 | * @return Shipping |
||
| 430 | */ |
||
| 431 | 52 | public function setCompanyName($companyName = null) |
|
| 437 | |||
| 438 | /** |
||
| 439 | * Get companyName. |
||
| 440 | * |
||
| 441 | * @return string|null |
||
| 442 | */ |
||
| 443 | 21 | public function getCompanyName() |
|
| 447 | |||
| 448 | /** |
||
| 449 | * Set phone_number. |
||
| 450 | * |
||
| 451 | * @param string|null $phone_number |
||
| 452 | * |
||
| 453 | * @return Shipping |
||
| 454 | */ |
||
| 455 | 52 | public function setPhoneNumber($phone_number = null) |
|
| 461 | |||
| 462 | /** |
||
| 463 | * Get phone_number. |
||
| 464 | * |
||
| 465 | * @return string|null |
||
| 466 | */ |
||
| 467 | 64 | public function getPhoneNumber() |
|
| 471 | |||
| 472 | /** |
||
| 473 | * Set postal_code. |
||
| 474 | * |
||
| 475 | * @param string|null $postal_code |
||
| 476 | * |
||
| 477 | * @return Shipping |
||
| 478 | */ |
||
| 479 | 52 | public function setPostalCode($postal_code = null) |
|
| 485 | |||
| 486 | /** |
||
| 487 | * Get postal_code. |
||
| 488 | * |
||
| 489 | * @return string|null |
||
| 490 | */ |
||
| 491 | 64 | public function getPostalCode() |
|
| 495 | |||
| 496 | /** |
||
| 497 | * Set addr01. |
||
| 498 | * |
||
| 499 | * @param string|null $addr01 |
||
| 500 | * |
||
| 501 | * @return Shipping |
||
| 502 | */ |
||
| 503 | 52 | public function setAddr01($addr01 = null) |
|
| 509 | |||
| 510 | /** |
||
| 511 | * Get addr01. |
||
| 512 | * |
||
| 513 | * @return string|null |
||
| 514 | */ |
||
| 515 | 64 | public function getAddr01() |
|
| 519 | |||
| 520 | /** |
||
| 521 | * Set addr02. |
||
| 522 | * |
||
| 523 | * @param string|null $addr02 |
||
| 524 | * |
||
| 525 | * @return Shipping |
||
| 526 | */ |
||
| 527 | 52 | public function setAddr02($addr02 = null) |
|
| 533 | |||
| 534 | /** |
||
| 535 | * Get addr02. |
||
| 536 | * |
||
| 537 | * @return string|null |
||
| 538 | */ |
||
| 539 | 64 | public function getAddr02() |
|
| 543 | |||
| 544 | /** |
||
| 545 | * Set shippingDeliveryName. |
||
| 546 | * |
||
| 547 | * @param string|null $shippingDeliveryName |
||
| 548 | * |
||
| 549 | * @return Shipping |
||
| 550 | */ |
||
| 551 | 183 | public function setShippingDeliveryName($shippingDeliveryName = null) |
|
| 557 | |||
| 558 | /** |
||
| 559 | * Get shippingDeliveryName. |
||
| 560 | * |
||
| 561 | * @return string|null |
||
| 562 | */ |
||
| 563 | 5 | public function getShippingDeliveryName() |
|
| 567 | |||
| 568 | /** |
||
| 569 | * Set shippingDeliveryTime. |
||
| 570 | * |
||
| 571 | * @param string|null $shippingDeliveryTime |
||
| 572 | * |
||
| 573 | * @return Shipping |
||
| 574 | */ |
||
| 575 | 20 | public function setShippingDeliveryTime($shippingDeliveryTime = null) |
|
| 581 | |||
| 582 | /** |
||
| 583 | * Get shippingDeliveryTime. |
||
| 584 | * |
||
| 585 | * @return string|null |
||
| 586 | */ |
||
| 587 | 16 | public function getShippingDeliveryTime() |
|
| 591 | |||
| 592 | /** |
||
| 593 | * Set shippingDeliveryDate. |
||
| 594 | * |
||
| 595 | * @param \DateTime|null $shippingDeliveryDate |
||
| 596 | * |
||
| 597 | * @return Shipping |
||
| 598 | */ |
||
| 599 | 5 | public function setShippingDeliveryDate($shippingDeliveryDate = null) |
|
| 605 | |||
| 606 | /** |
||
| 607 | * Get shippingDeliveryDate. |
||
| 608 | * |
||
| 609 | * @return \DateTime|null |
||
| 610 | */ |
||
| 611 | 21 | public function getShippingDeliveryDate() |
|
| 615 | |||
| 616 | /** |
||
| 617 | * Set shippingDeliveryFee. |
||
| 618 | * |
||
| 619 | * @param string|null $shippingDeliveryFee |
||
| 620 | * |
||
| 621 | * @return Shipping |
||
| 622 | */ |
||
| 623 | 182 | public function setShippingDeliveryFee($shippingDeliveryFee = null) |
|
| 629 | |||
| 630 | /** |
||
| 631 | * Get shippingDeliveryFee. |
||
| 632 | * |
||
| 633 | * @return string|null |
||
| 634 | */ |
||
| 635 | 182 | public function getShippingDeliveryFee() |
|
| 639 | |||
| 640 | /** |
||
| 641 | * Set shippingDate. |
||
| 642 | * |
||
| 643 | * @param \DateTime|null $shippingDate |
||
| 644 | * |
||
| 645 | * @return Shipping |
||
| 646 | */ |
||
| 647 | 8 | public function setShippingDate($shippingDate = null) |
|
| 653 | |||
| 654 | /** |
||
| 655 | * Get shippingDate. |
||
| 656 | * |
||
| 657 | * @return \DateTime|null |
||
| 658 | */ |
||
| 659 | 10 | public function getShippingDate() |
|
| 663 | |||
| 664 | /** |
||
| 665 | * Set sortNo. |
||
| 666 | * |
||
| 667 | * @param int|null $sortNo |
||
| 668 | * |
||
| 669 | * @return Shipping |
||
| 670 | */ |
||
| 671 | public function setSortNo($sortNo = null) |
||
| 677 | |||
| 678 | /** |
||
| 679 | * Get sortNo. |
||
| 680 | * |
||
| 681 | * @return int|null |
||
| 682 | */ |
||
| 683 | public function getSortNo() |
||
| 687 | |||
| 688 | /** |
||
| 689 | * Set createDate. |
||
| 690 | * |
||
| 691 | * @param \DateTime $createDate |
||
| 692 | * |
||
| 693 | * @return Shipping |
||
| 694 | */ |
||
| 695 | 183 | public function setCreateDate($createDate) |
|
| 701 | |||
| 702 | /** |
||
| 703 | * Get createDate. |
||
| 704 | * |
||
| 705 | * @return \DateTime |
||
| 706 | */ |
||
| 707 | public function getCreateDate() |
||
| 711 | |||
| 712 | /** |
||
| 713 | * Set updateDate. |
||
| 714 | * |
||
| 715 | * @param \DateTime $updateDate |
||
| 716 | * |
||
| 717 | * @return Shipping |
||
| 718 | */ |
||
| 719 | 183 | public function setUpdateDate($updateDate) |
|
| 725 | |||
| 726 | /** |
||
| 727 | * Get updateDate. |
||
| 728 | * |
||
| 729 | * @return \DateTime |
||
| 730 | */ |
||
| 731 | 5 | public function getUpdateDate() |
|
| 735 | |||
| 736 | /** |
||
| 737 | * Add orderItem. |
||
| 738 | * |
||
| 739 | * @param \Eccube\Entity\OrderItem $OrderItem |
||
| 740 | * |
||
| 741 | * @return Shipping |
||
| 742 | */ |
||
| 743 | 193 | public function addOrderItem(\Eccube\Entity\OrderItem $OrderItem) |
|
| 749 | |||
| 750 | /** |
||
| 751 | * Remove orderItem. |
||
| 752 | * |
||
| 753 | * @param \Eccube\Entity\OrderItem $OrderItem |
||
| 754 | * |
||
| 755 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
| 756 | */ |
||
| 757 | 25 | public function removeOrderItem(\Eccube\Entity\OrderItem $OrderItem) |
|
| 761 | |||
| 762 | /** |
||
| 763 | * Get orderItems. |
||
| 764 | * |
||
| 765 | * @return \Doctrine\Common\Collections\Collection |
||
| 766 | */ |
||
| 767 | 79 | public function getOrderItems() |
|
| 771 | |||
| 772 | /** |
||
| 773 | * 商品の受注明細を取得 |
||
| 774 | * |
||
| 775 | * @return OrderItem[] |
||
| 776 | */ |
||
| 777 | 60 | public function getProductOrderItems() |
|
| 783 | |||
| 784 | /** |
||
| 785 | * Set country. |
||
| 786 | * |
||
| 787 | * @param \Eccube\Entity\Master\Country|null $country |
||
| 788 | * |
||
| 789 | * @return Shipping |
||
| 790 | */ |
||
| 791 | public function setCountry(\Eccube\Entity\Master\Country $country = null) |
||
| 797 | |||
| 798 | /** |
||
| 799 | * Get country. |
||
| 800 | * |
||
| 801 | * @return \Eccube\Entity\Master\Country|null |
||
| 802 | */ |
||
| 803 | public function getCountry() |
||
| 807 | |||
| 808 | /** |
||
| 809 | * Set pref. |
||
| 810 | * |
||
| 811 | * @param \Eccube\Entity\Master\Pref|null $pref |
||
| 812 | * |
||
| 813 | * @return Shipping |
||
| 814 | */ |
||
| 815 | 183 | public function setPref(\Eccube\Entity\Master\Pref $pref = null) |
|
| 821 | |||
| 822 | /** |
||
| 823 | * Get pref. |
||
| 824 | * |
||
| 825 | * @return \Eccube\Entity\Master\Pref|null |
||
| 826 | */ |
||
| 827 | 71 | public function getPref() |
|
| 831 | |||
| 832 | /** |
||
| 833 | * Set delivery. |
||
| 834 | * |
||
| 835 | * @param \Eccube\Entity\Delivery|null $delivery |
||
| 836 | * |
||
| 837 | * @return Shipping |
||
| 838 | */ |
||
| 839 | 183 | public function setDelivery(\Eccube\Entity\Delivery $delivery = null) |
|
| 845 | |||
| 846 | /** |
||
| 847 | * Get delivery. |
||
| 848 | * |
||
| 849 | * @return \Eccube\Entity\Delivery|null |
||
| 850 | */ |
||
| 851 | 59 | public function getDelivery() |
|
| 855 | |||
| 856 | /** |
||
| 857 | * Product class of shipment item (temp) |
||
| 858 | * |
||
| 859 | * @return \Eccube\Entity\ProductClass |
||
| 860 | */ |
||
| 861 | 26 | public function getProductClassOfTemp() |
|
| 865 | |||
| 866 | /** |
||
| 867 | * Product class of shipment item (temp) |
||
| 868 | * |
||
| 869 | * @param \Eccube\Entity\ProductClass $ProductClassOfTemp |
||
| 870 | * |
||
| 871 | * @return $this |
||
| 872 | */ |
||
| 873 | 26 | public function setProductClassOfTemp(\Eccube\Entity\ProductClass $ProductClassOfTemp) |
|
| 879 | |||
| 880 | /** |
||
| 881 | * Get orders. |
||
| 882 | * |
||
| 883 | * @return \Doctrine\Common\Collections\Collection |
||
| 884 | */ |
||
| 885 | 13 | public function getOrders() |
|
| 904 | |||
| 905 | /** |
||
| 906 | * Set trackingNumber |
||
| 907 | * |
||
| 908 | * @param string $trackingNumber |
||
| 909 | * |
||
| 910 | * @return Shipping |
||
| 911 | */ |
||
| 912 | public function setTrackingNumber($trackingNumber) |
||
| 918 | |||
| 919 | /** |
||
| 920 | * Get trackingNumber |
||
| 921 | * |
||
| 922 | * @return string |
||
| 923 | */ |
||
| 924 | 11 | public function getTrackingNumber() |
|
| 928 | |||
| 929 | /** |
||
| 930 | * Set note. |
||
| 931 | * |
||
| 932 | * @param string|null $note |
||
| 933 | * |
||
| 934 | * @return Shipping |
||
| 935 | */ |
||
| 936 | public function setNote($note = null) |
||
| 942 | |||
| 943 | /** |
||
| 944 | * Get note. |
||
| 945 | * |
||
| 946 | * @return string|null |
||
| 947 | */ |
||
| 948 | 7 | public function getNote() |
|
| 952 | |||
| 953 | /** |
||
| 954 | * Set ShippingStatus. |
||
| 955 | * |
||
| 956 | * @param ShippingStatus $ShippingStatus |
||
| 957 | * |
||
| 958 | * @return $this |
||
| 959 | */ |
||
| 960 | 183 | public function setShippingStatus(ShippingStatus $ShippingStatus) |
|
| 966 | |||
| 967 | /** |
||
| 968 | * Get ShippingStatus |
||
| 969 | * |
||
| 970 | * @return ShippingStatus |
||
| 971 | */ |
||
| 972 | 11 | public function getShippingStatus() |
|
| 976 | |||
| 977 | /** |
||
| 978 | * Set timeId |
||
| 979 | * |
||
| 980 | * @param integer $timeId |
||
| 981 | * |
||
| 982 | * @return Shipping |
||
| 983 | */ |
||
| 984 | 20 | public function setTimeId($timeId) |
|
| 990 | |||
| 991 | /** |
||
| 992 | * Get timeId |
||
| 993 | * |
||
| 994 | * @return integer |
||
| 995 | */ |
||
| 996 | 6 | public function getTimeId() |
|
| 1000 | |||
| 1001 | /** |
||
| 1002 | * Set feeId |
||
| 1003 | * |
||
| 1004 | * @param integer $feeId |
||
| 1005 | * |
||
| 1006 | * @return Shipping |
||
| 1007 | */ |
||
| 1008 | 182 | public function setFeeId($feeId) |
|
| 1014 | |||
| 1015 | /** |
||
| 1016 | * Get feeId |
||
| 1017 | * |
||
| 1018 | * @return integer |
||
| 1019 | */ |
||
| 1020 | public function getFeeId() |
||
| 1024 | |||
| 1025 | /** |
||
| 1026 | * Set creator. |
||
| 1027 | * |
||
| 1028 | * @param \Eccube\Entity\Member|null $creator |
||
| 1029 | * |
||
| 1030 | * @return Shipping |
||
| 1031 | */ |
||
| 1032 | 7 | public function setCreator(\Eccube\Entity\Member $creator = null) |
|
| 1038 | |||
| 1039 | /** |
||
| 1040 | * Get creator. |
||
| 1041 | * |
||
| 1042 | * @return \Eccube\Entity\Member|null |
||
| 1043 | */ |
||
| 1044 | 5 | public function getCreator() |
|
| 1048 | } |
||
| 1049 |
This check marks private properties in classes that are never used. Those properties can be removed.