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="tel01", type="string", length=5, nullable=true) |
||
| 85 | */ |
||
| 86 | private $tel01; |
||
| 87 | |||
| 88 | /** |
||
| 89 | * @var string|null |
||
| 90 | * |
||
| 91 | * @ORM\Column(name="tel02", type="string", length=4, nullable=true) |
||
| 92 | */ |
||
| 93 | private $tel02; |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @var string|null |
||
| 97 | * |
||
| 98 | * @ORM\Column(name="tel03", type="string", length=4, nullable=true) |
||
| 99 | */ |
||
| 100 | private $tel03; |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @var string|null |
||
| 104 | * |
||
| 105 | * @ORM\Column(name="fax01", type="string", length=5, nullable=true) |
||
| 106 | */ |
||
| 107 | private $fax01; |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @var string|null |
||
| 111 | * |
||
| 112 | * @ORM\Column(name="fax02", type="string", length=4, nullable=true) |
||
| 113 | */ |
||
| 114 | private $fax02; |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @var string|null |
||
| 118 | * |
||
| 119 | * @ORM\Column(name="fax03", type="string", length=4, nullable=true) |
||
| 120 | */ |
||
| 121 | private $fax03; |
||
| 122 | |||
| 123 | /** |
||
| 124 | * @var string|null |
||
| 125 | * |
||
| 126 | * @ORM\Column(name="zip01", type="string", length=3, nullable=true) |
||
| 127 | */ |
||
| 128 | private $zip01; |
||
| 129 | |||
| 130 | /** |
||
| 131 | * @var string|null |
||
| 132 | * |
||
| 133 | * @ORM\Column(name="zip02", type="string", length=4, nullable=true) |
||
| 134 | */ |
||
| 135 | private $zip02; |
||
| 136 | |||
| 137 | /** |
||
| 138 | * @var string|null |
||
| 139 | * |
||
| 140 | * @ORM\Column(name="zipcode", type="string", length=7, nullable=true) |
||
| 141 | */ |
||
| 142 | private $zipcode; |
||
| 143 | |||
| 144 | /** |
||
| 145 | * @var string|null |
||
| 146 | * |
||
| 147 | * @ORM\Column(name="addr01", type="string", length=255, nullable=true) |
||
| 148 | */ |
||
| 149 | private $addr01; |
||
| 150 | |||
| 151 | /** |
||
| 152 | * @var string|null |
||
| 153 | * |
||
| 154 | * @ORM\Column(name="addr02", type="string", length=255, nullable=true) |
||
| 155 | */ |
||
| 156 | private $addr02; |
||
| 157 | |||
| 158 | /** |
||
| 159 | * @var string|null |
||
| 160 | * |
||
| 161 | * @ORM\Column(name="delivery_name", type="string", length=255, nullable=true) |
||
| 162 | */ |
||
| 163 | private $shipping_delivery_name; |
||
| 164 | |||
| 165 | /** |
||
| 166 | * @var int |
||
| 167 | * |
||
| 168 | * @ORM\Column(name="time_id", type="integer", options={"unsigned":true}, nullable=true) |
||
| 169 | */ |
||
| 170 | private $time_id; |
||
| 171 | |||
| 172 | /** |
||
| 173 | * @var int |
||
| 174 | * |
||
| 175 | * @ORM\Column(name="fee_id", type="integer", options={"unsigned":true}, nullable=true) |
||
| 176 | */ |
||
| 177 | private $fee_id; |
||
| 178 | |||
| 179 | /** |
||
| 180 | * @var string|null |
||
| 181 | * |
||
| 182 | * @ORM\Column(name="delivery_time", type="string", length=255, nullable=true) |
||
| 183 | */ |
||
| 184 | private $shipping_delivery_time; |
||
| 185 | |||
| 186 | /** |
||
| 187 | * お届け予定日/お届け希望日 |
||
| 188 | * |
||
| 189 | * @var \DateTime|null |
||
| 190 | * |
||
| 191 | * @ORM\Column(name="delivery_date", type="datetimetz", nullable=true) |
||
| 192 | */ |
||
| 193 | private $shipping_delivery_date; |
||
| 194 | |||
| 195 | /** |
||
| 196 | * @var string|null |
||
| 197 | * |
||
| 198 | * @ORM\Column(name="delivery_fee", type="decimal", precision=12, scale=2, nullable=true, options={"unsigned":true,"default":0}) |
||
| 199 | */ |
||
| 200 | private $shipping_delivery_fee = 0; |
||
| 201 | |||
| 202 | /** |
||
| 203 | * 出荷日 |
||
| 204 | * |
||
| 205 | * @var \DateTime|null |
||
| 206 | * |
||
| 207 | * @ORM\Column(name="shipping_date", type="datetimetz", nullable=true) |
||
| 208 | */ |
||
| 209 | private $shipping_date; |
||
| 210 | |||
| 211 | /** |
||
| 212 | * @var string |
||
| 213 | * |
||
| 214 | * @ORM\Column(name="tracking_number", type="string", length=255, nullable=true) |
||
| 215 | */ |
||
| 216 | private $tracking_number; |
||
| 217 | |||
| 218 | /** |
||
| 219 | * @var string |
||
| 220 | * |
||
| 221 | * @ORM\Column(name="note", type="string", length=4000, nullable=true) |
||
| 222 | */ |
||
| 223 | private $note; |
||
| 224 | |||
| 225 | /** |
||
| 226 | * @var int|null |
||
| 227 | * |
||
| 228 | * @ORM\Column(name="sort_no", type="smallint", nullable=true, options={"unsigned":true}) |
||
| 229 | */ |
||
| 230 | private $sort_no; |
||
| 231 | |||
| 232 | /** |
||
| 233 | * @var \DateTime |
||
| 234 | * |
||
| 235 | * @ORM\Column(name="create_date", type="datetimetz") |
||
| 236 | */ |
||
| 237 | private $create_date; |
||
| 238 | |||
| 239 | /** |
||
| 240 | * @var \DateTime |
||
| 241 | * |
||
| 242 | * @ORM\Column(name="update_date", type="datetimetz") |
||
| 243 | */ |
||
| 244 | private $update_date; |
||
| 245 | |||
| 246 | /** |
||
| 247 | * @var \Doctrine\Common\Collections\Collection |
||
| 248 | * |
||
| 249 | * @ORM\OneToMany(targetEntity="Eccube\Entity\OrderItem", mappedBy="Shipping", cascade={"persist"}) |
||
| 250 | */ |
||
| 251 | private $OrderItems; |
||
| 252 | |||
| 253 | /** |
||
| 254 | * @var \Eccube\Entity\Master\Country |
||
| 255 | * |
||
| 256 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country") |
||
| 257 | * @ORM\JoinColumns({ |
||
| 258 | * @ORM\JoinColumn(name="country_id", referencedColumnName="id") |
||
| 259 | * }) |
||
| 260 | */ |
||
| 261 | private $Country; |
||
| 262 | |||
| 263 | /** |
||
| 264 | * @var \Eccube\Entity\Master\Pref |
||
| 265 | * |
||
| 266 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref") |
||
| 267 | * @ORM\JoinColumns({ |
||
| 268 | * @ORM\JoinColumn(name="pref_id", referencedColumnName="id") |
||
| 269 | * }) |
||
| 270 | */ |
||
| 271 | private $Pref; |
||
| 272 | |||
| 273 | /** |
||
| 274 | * @var \Eccube\Entity\Delivery |
||
| 275 | * |
||
| 276 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Delivery") |
||
| 277 | * @ORM\JoinColumns({ |
||
| 278 | * @ORM\JoinColumn(name="delivery_id", referencedColumnName="id") |
||
| 279 | * }) |
||
| 280 | */ |
||
| 281 | private $Delivery; |
||
| 282 | |||
| 283 | /** |
||
| 284 | * @var \Doctrine\Common\Collections\Collection |
||
| 285 | */ |
||
| 286 | private $Orders; |
||
|
|
|||
| 287 | |||
| 288 | /** |
||
| 289 | * @var \Eccube\Entity\ProductClass |
||
| 290 | */ |
||
| 291 | private $ProductClassOfTemp; |
||
| 292 | |||
| 293 | /** |
||
| 294 | * @var \Eccube\Entity\Master\ShippingStatus |
||
| 295 | * |
||
| 296 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\ShippingStatus") |
||
| 297 | * @ORM\JoinColumns({ |
||
| 298 | * @ORM\JoinColumn(name="shipping_status_id", referencedColumnName="id") |
||
| 299 | * }) |
||
| 300 | */ |
||
| 301 | private $ShippingStatus; |
||
| 302 | |||
| 303 | /** |
||
| 304 | * @var \Eccube\Entity\Member |
||
| 305 | * |
||
| 306 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member") |
||
| 307 | * @ORM\JoinColumns({ |
||
| 308 | * @ORM\JoinColumn(name="creator_id", referencedColumnName="id") |
||
| 309 | * }) |
||
| 310 | */ |
||
| 311 | private $Creator; |
||
| 312 | |||
| 313 | /** |
||
| 314 | * Constructor |
||
| 315 | */ |
||
| 316 | 198 | public function __construct() |
|
| 320 | |||
| 321 | /** |
||
| 322 | * CustomerAddress から個人情報を設定. |
||
| 323 | * |
||
| 324 | * @param \Eccube\Entity\CustomerAddress $CustomerAddress |
||
| 325 | * |
||
| 326 | * @return \Eccube\Entity\Shipping |
||
| 327 | */ |
||
| 328 | 25 | View Code Duplication | public function setFromCustomerAddress(CustomerAddress $CustomerAddress) |
| 351 | |||
| 352 | /** |
||
| 353 | * 個人情報をクリア. |
||
| 354 | * |
||
| 355 | * @return \Eccube\Entity\Shipping |
||
| 356 | */ |
||
| 357 | public function clearCustomerAddress() |
||
| 380 | |||
| 381 | /** |
||
| 382 | * Get id. |
||
| 383 | * |
||
| 384 | * @return int |
||
| 385 | */ |
||
| 386 | 79 | public function getId() |
|
| 390 | |||
| 391 | /** |
||
| 392 | * Set name01. |
||
| 393 | * |
||
| 394 | * @param string $name01 |
||
| 395 | * |
||
| 396 | * @return Shipping |
||
| 397 | */ |
||
| 398 | 66 | public function setName01($name01) |
|
| 404 | |||
| 405 | /** |
||
| 406 | * Get name01. |
||
| 407 | * |
||
| 408 | * @return string |
||
| 409 | */ |
||
| 410 | 66 | public function getName01() |
|
| 414 | |||
| 415 | /** |
||
| 416 | * Set name02. |
||
| 417 | * |
||
| 418 | * @param string $name02 |
||
| 419 | * |
||
| 420 | * @return Shipping |
||
| 421 | */ |
||
| 422 | 54 | public function setName02($name02) |
|
| 428 | |||
| 429 | /** |
||
| 430 | * Get name02. |
||
| 431 | * |
||
| 432 | * @return string |
||
| 433 | */ |
||
| 434 | 64 | public function getName02() |
|
| 438 | |||
| 439 | /** |
||
| 440 | * Set kana01. |
||
| 441 | * |
||
| 442 | * @param string $kana01 |
||
| 443 | * |
||
| 444 | * @return Shipping |
||
| 445 | */ |
||
| 446 | 54 | public function setKana01($kana01) |
|
| 452 | |||
| 453 | /** |
||
| 454 | * Get kana01. |
||
| 455 | * |
||
| 456 | * @return string |
||
| 457 | */ |
||
| 458 | 61 | public function getKana01() |
|
| 462 | |||
| 463 | /** |
||
| 464 | * Set kana02. |
||
| 465 | * |
||
| 466 | * @param string $kana02 |
||
| 467 | * |
||
| 468 | * @return Shipping |
||
| 469 | */ |
||
| 470 | 52 | public function setKana02($kana02) |
|
| 476 | |||
| 477 | /** |
||
| 478 | * Get kana02. |
||
| 479 | * |
||
| 480 | * @return string |
||
| 481 | */ |
||
| 482 | 60 | public function getKana02() |
|
| 486 | |||
| 487 | /** |
||
| 488 | * Set companyName. |
||
| 489 | * |
||
| 490 | * @param string|null $companyName |
||
| 491 | * |
||
| 492 | * @return Shipping |
||
| 493 | */ |
||
| 494 | 52 | public function setCompanyName($companyName = null) |
|
| 500 | |||
| 501 | /** |
||
| 502 | * Get companyName. |
||
| 503 | * |
||
| 504 | * @return string|null |
||
| 505 | */ |
||
| 506 | 21 | public function getCompanyName() |
|
| 510 | |||
| 511 | /** |
||
| 512 | * Set tel01. |
||
| 513 | * |
||
| 514 | * @param string|null $tel01 |
||
| 515 | * |
||
| 516 | * @return Shipping |
||
| 517 | */ |
||
| 518 | 52 | public function setTel01($tel01 = null) |
|
| 524 | |||
| 525 | /** |
||
| 526 | * Get tel01. |
||
| 527 | * |
||
| 528 | * @return string|null |
||
| 529 | */ |
||
| 530 | 64 | public function getTel01() |
|
| 534 | |||
| 535 | /** |
||
| 536 | * Set tel02. |
||
| 537 | * |
||
| 538 | * @param string|null $tel02 |
||
| 539 | * |
||
| 540 | * @return Shipping |
||
| 541 | */ |
||
| 542 | 52 | public function setTel02($tel02 = null) |
|
| 548 | |||
| 549 | /** |
||
| 550 | * Get tel02. |
||
| 551 | * |
||
| 552 | * @return string|null |
||
| 553 | */ |
||
| 554 | 64 | public function getTel02() |
|
| 558 | |||
| 559 | /** |
||
| 560 | * Set tel03. |
||
| 561 | * |
||
| 562 | * @param string|null $tel03 |
||
| 563 | * |
||
| 564 | * @return Shipping |
||
| 565 | */ |
||
| 566 | 52 | public function setTel03($tel03 = null) |
|
| 572 | |||
| 573 | /** |
||
| 574 | * Get tel03. |
||
| 575 | * |
||
| 576 | * @return string|null |
||
| 577 | */ |
||
| 578 | 64 | public function getTel03() |
|
| 582 | |||
| 583 | /** |
||
| 584 | * Set fax01. |
||
| 585 | * |
||
| 586 | * @param string|null $fax01 |
||
| 587 | * |
||
| 588 | * @return Shipping |
||
| 589 | */ |
||
| 590 | 52 | public function setFax01($fax01 = null) |
|
| 596 | |||
| 597 | /** |
||
| 598 | * Get fax01. |
||
| 599 | * |
||
| 600 | * @return string|null |
||
| 601 | */ |
||
| 602 | 21 | public function getFax01() |
|
| 606 | |||
| 607 | /** |
||
| 608 | * Set fax02. |
||
| 609 | * |
||
| 610 | * @param string|null $fax02 |
||
| 611 | * |
||
| 612 | * @return Shipping |
||
| 613 | */ |
||
| 614 | 52 | public function setFax02($fax02 = null) |
|
| 620 | |||
| 621 | /** |
||
| 622 | * Get fax02. |
||
| 623 | * |
||
| 624 | * @return string|null |
||
| 625 | */ |
||
| 626 | 21 | public function getFax02() |
|
| 630 | |||
| 631 | /** |
||
| 632 | * Set fax03. |
||
| 633 | * |
||
| 634 | * @param string|null $fax03 |
||
| 635 | * |
||
| 636 | * @return Shipping |
||
| 637 | */ |
||
| 638 | 52 | public function setFax03($fax03 = null) |
|
| 644 | |||
| 645 | /** |
||
| 646 | * Get fax03. |
||
| 647 | * |
||
| 648 | * @return string|null |
||
| 649 | */ |
||
| 650 | 21 | public function getFax03() |
|
| 654 | |||
| 655 | /** |
||
| 656 | * Set zip01. |
||
| 657 | * |
||
| 658 | * @param string|null $zip01 |
||
| 659 | * |
||
| 660 | * @return Shipping |
||
| 661 | */ |
||
| 662 | 55 | public function setZip01($zip01 = null) |
|
| 668 | |||
| 669 | /** |
||
| 670 | * Get zip01. |
||
| 671 | * |
||
| 672 | * @return string|null |
||
| 673 | */ |
||
| 674 | 64 | public function getZip01() |
|
| 678 | |||
| 679 | /** |
||
| 680 | * Set zip02. |
||
| 681 | * |
||
| 682 | * @param string|null $zip02 |
||
| 683 | * |
||
| 684 | * @return Shipping |
||
| 685 | */ |
||
| 686 | 55 | public function setZip02($zip02 = null) |
|
| 692 | |||
| 693 | /** |
||
| 694 | * Get zip02. |
||
| 695 | * |
||
| 696 | * @return string|null |
||
| 697 | */ |
||
| 698 | 64 | public function getZip02() |
|
| 702 | |||
| 703 | /** |
||
| 704 | * Set zipcode. |
||
| 705 | * |
||
| 706 | * @param string|null $zipcode |
||
| 707 | * |
||
| 708 | * @return Shipping |
||
| 709 | */ |
||
| 710 | 51 | public function setZipcode($zipcode = null) |
|
| 716 | |||
| 717 | /** |
||
| 718 | * Get zipcode. |
||
| 719 | * |
||
| 720 | * @return string|null |
||
| 721 | */ |
||
| 722 | public function getZipcode() |
||
| 726 | |||
| 727 | /** |
||
| 728 | * Set addr01. |
||
| 729 | * |
||
| 730 | * @param string|null $addr01 |
||
| 731 | * |
||
| 732 | * @return Shipping |
||
| 733 | */ |
||
| 734 | 52 | public function setAddr01($addr01 = null) |
|
| 740 | |||
| 741 | /** |
||
| 742 | * Get addr01. |
||
| 743 | * |
||
| 744 | * @return string|null |
||
| 745 | */ |
||
| 746 | 64 | public function getAddr01() |
|
| 750 | |||
| 751 | /** |
||
| 752 | * Set addr02. |
||
| 753 | * |
||
| 754 | * @param string|null $addr02 |
||
| 755 | * |
||
| 756 | * @return Shipping |
||
| 757 | */ |
||
| 758 | 52 | public function setAddr02($addr02 = null) |
|
| 764 | |||
| 765 | /** |
||
| 766 | * Get addr02. |
||
| 767 | * |
||
| 768 | * @return string|null |
||
| 769 | */ |
||
| 770 | 64 | public function getAddr02() |
|
| 774 | |||
| 775 | /** |
||
| 776 | * Set shippingDeliveryName. |
||
| 777 | * |
||
| 778 | * @param string|null $shippingDeliveryName |
||
| 779 | * |
||
| 780 | * @return Shipping |
||
| 781 | */ |
||
| 782 | 186 | public function setShippingDeliveryName($shippingDeliveryName = null) |
|
| 788 | |||
| 789 | /** |
||
| 790 | * Get shippingDeliveryName. |
||
| 791 | * |
||
| 792 | * @return string|null |
||
| 793 | */ |
||
| 794 | 5 | public function getShippingDeliveryName() |
|
| 798 | |||
| 799 | /** |
||
| 800 | * Set shippingDeliveryTime. |
||
| 801 | * |
||
| 802 | * @param string|null $shippingDeliveryTime |
||
| 803 | * |
||
| 804 | * @return Shipping |
||
| 805 | */ |
||
| 806 | 20 | public function setShippingDeliveryTime($shippingDeliveryTime = null) |
|
| 812 | |||
| 813 | /** |
||
| 814 | * Get shippingDeliveryTime. |
||
| 815 | * |
||
| 816 | * @return string|null |
||
| 817 | */ |
||
| 818 | 16 | public function getShippingDeliveryTime() |
|
| 822 | |||
| 823 | /** |
||
| 824 | * Set shippingDeliveryDate. |
||
| 825 | * |
||
| 826 | * @param \DateTime|null $shippingDeliveryDate |
||
| 827 | * |
||
| 828 | * @return Shipping |
||
| 829 | */ |
||
| 830 | 5 | public function setShippingDeliveryDate($shippingDeliveryDate = null) |
|
| 836 | |||
| 837 | /** |
||
| 838 | * Get shippingDeliveryDate. |
||
| 839 | * |
||
| 840 | * @return \DateTime|null |
||
| 841 | */ |
||
| 842 | 21 | public function getShippingDeliveryDate() |
|
| 846 | |||
| 847 | /** |
||
| 848 | * Set shippingDeliveryFee. |
||
| 849 | * |
||
| 850 | * @param string|null $shippingDeliveryFee |
||
| 851 | * |
||
| 852 | * @return Shipping |
||
| 853 | */ |
||
| 854 | 185 | public function setShippingDeliveryFee($shippingDeliveryFee = null) |
|
| 860 | |||
| 861 | /** |
||
| 862 | * Get shippingDeliveryFee. |
||
| 863 | * |
||
| 864 | * @return string|null |
||
| 865 | */ |
||
| 866 | 185 | public function getShippingDeliveryFee() |
|
| 870 | |||
| 871 | /** |
||
| 872 | * Set shippingDate. |
||
| 873 | * |
||
| 874 | * @param \DateTime|null $shippingDate |
||
| 875 | * |
||
| 876 | * @return Shipping |
||
| 877 | */ |
||
| 878 | 8 | public function setShippingDate($shippingDate = null) |
|
| 884 | |||
| 885 | /** |
||
| 886 | * Get shippingDate. |
||
| 887 | * |
||
| 888 | * @return \DateTime|null |
||
| 889 | */ |
||
| 890 | 10 | public function getShippingDate() |
|
| 894 | |||
| 895 | /** |
||
| 896 | * Set sortNo. |
||
| 897 | * |
||
| 898 | * @param int|null $sortNo |
||
| 899 | * |
||
| 900 | * @return Shipping |
||
| 901 | */ |
||
| 902 | public function setSortNo($sortNo = null) |
||
| 908 | |||
| 909 | /** |
||
| 910 | * Get sortNo. |
||
| 911 | * |
||
| 912 | * @return int|null |
||
| 913 | */ |
||
| 914 | public function getSortNo() |
||
| 918 | |||
| 919 | /** |
||
| 920 | * Set createDate. |
||
| 921 | * |
||
| 922 | * @param \DateTime $createDate |
||
| 923 | * |
||
| 924 | * @return Shipping |
||
| 925 | */ |
||
| 926 | 186 | public function setCreateDate($createDate) |
|
| 932 | |||
| 933 | /** |
||
| 934 | * Get createDate. |
||
| 935 | * |
||
| 936 | * @return \DateTime |
||
| 937 | */ |
||
| 938 | public function getCreateDate() |
||
| 942 | |||
| 943 | /** |
||
| 944 | * Set updateDate. |
||
| 945 | * |
||
| 946 | * @param \DateTime $updateDate |
||
| 947 | * |
||
| 948 | * @return Shipping |
||
| 949 | */ |
||
| 950 | 186 | public function setUpdateDate($updateDate) |
|
| 956 | |||
| 957 | /** |
||
| 958 | * Get updateDate. |
||
| 959 | * |
||
| 960 | * @return \DateTime |
||
| 961 | */ |
||
| 962 | 5 | public function getUpdateDate() |
|
| 966 | |||
| 967 | /** |
||
| 968 | * Add orderItem. |
||
| 969 | * |
||
| 970 | * @param \Eccube\Entity\OrderItem $OrderItem |
||
| 971 | * |
||
| 972 | * @return Shipping |
||
| 973 | */ |
||
| 974 | 196 | public function addOrderItem(\Eccube\Entity\OrderItem $OrderItem) |
|
| 980 | |||
| 981 | /** |
||
| 982 | * Remove orderItem. |
||
| 983 | * |
||
| 984 | * @param \Eccube\Entity\OrderItem $OrderItem |
||
| 985 | * |
||
| 986 | * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. |
||
| 987 | */ |
||
| 988 | 25 | public function removeOrderItem(\Eccube\Entity\OrderItem $OrderItem) |
|
| 992 | |||
| 993 | /** |
||
| 994 | * Get orderItems. |
||
| 995 | * |
||
| 996 | * @return \Doctrine\Common\Collections\Collection |
||
| 997 | */ |
||
| 998 | 79 | public function getOrderItems() |
|
| 1002 | |||
| 1003 | /** |
||
| 1004 | * 商品の受注明細を取得 |
||
| 1005 | * |
||
| 1006 | * @return OrderItem[] |
||
| 1007 | */ |
||
| 1008 | 60 | public function getProductOrderItems() |
|
| 1014 | |||
| 1015 | /** |
||
| 1016 | * Set country. |
||
| 1017 | * |
||
| 1018 | * @param \Eccube\Entity\Master\Country|null $country |
||
| 1019 | * |
||
| 1020 | * @return Shipping |
||
| 1021 | */ |
||
| 1022 | public function setCountry(\Eccube\Entity\Master\Country $country = null) |
||
| 1028 | |||
| 1029 | /** |
||
| 1030 | * Get country. |
||
| 1031 | * |
||
| 1032 | * @return \Eccube\Entity\Master\Country|null |
||
| 1033 | */ |
||
| 1034 | public function getCountry() |
||
| 1038 | |||
| 1039 | /** |
||
| 1040 | * Set pref. |
||
| 1041 | * |
||
| 1042 | * @param \Eccube\Entity\Master\Pref|null $pref |
||
| 1043 | * |
||
| 1044 | * @return Shipping |
||
| 1045 | */ |
||
| 1046 | 186 | public function setPref(\Eccube\Entity\Master\Pref $pref = null) |
|
| 1052 | |||
| 1053 | /** |
||
| 1054 | * Get pref. |
||
| 1055 | * |
||
| 1056 | * @return \Eccube\Entity\Master\Pref|null |
||
| 1057 | */ |
||
| 1058 | 71 | public function getPref() |
|
| 1062 | |||
| 1063 | /** |
||
| 1064 | * Set delivery. |
||
| 1065 | * |
||
| 1066 | * @param \Eccube\Entity\Delivery|null $delivery |
||
| 1067 | * |
||
| 1068 | * @return Shipping |
||
| 1069 | */ |
||
| 1070 | 186 | public function setDelivery(\Eccube\Entity\Delivery $delivery = null) |
|
| 1076 | |||
| 1077 | /** |
||
| 1078 | * Get delivery. |
||
| 1079 | * |
||
| 1080 | * @return \Eccube\Entity\Delivery|null |
||
| 1081 | */ |
||
| 1082 | 59 | public function getDelivery() |
|
| 1086 | |||
| 1087 | /** |
||
| 1088 | * Product class of shipment item (temp) |
||
| 1089 | * |
||
| 1090 | * @return \Eccube\Entity\ProductClass |
||
| 1091 | */ |
||
| 1092 | 26 | public function getProductClassOfTemp() |
|
| 1096 | |||
| 1097 | /** |
||
| 1098 | * Product class of shipment item (temp) |
||
| 1099 | * |
||
| 1100 | * @param \Eccube\Entity\ProductClass $ProductClassOfTemp |
||
| 1101 | * |
||
| 1102 | * @return $this |
||
| 1103 | */ |
||
| 1104 | 26 | public function setProductClassOfTemp(\Eccube\Entity\ProductClass $ProductClassOfTemp) |
|
| 1110 | |||
| 1111 | /** |
||
| 1112 | * Get orders. |
||
| 1113 | * |
||
| 1114 | * @return \Doctrine\Common\Collections\Collection |
||
| 1115 | */ |
||
| 1116 | 13 | public function getOrders() |
|
| 1135 | |||
| 1136 | /** |
||
| 1137 | * Set trackingNumber |
||
| 1138 | * |
||
| 1139 | * @param string $trackingNumber |
||
| 1140 | * |
||
| 1141 | * @return Shipping |
||
| 1142 | */ |
||
| 1143 | public function setTrackingNumber($trackingNumber) |
||
| 1149 | |||
| 1150 | /** |
||
| 1151 | * Get trackingNumber |
||
| 1152 | * |
||
| 1153 | * @return string |
||
| 1154 | */ |
||
| 1155 | 11 | public function getTrackingNumber() |
|
| 1159 | |||
| 1160 | /** |
||
| 1161 | * Set note. |
||
| 1162 | * |
||
| 1163 | * @param string|null $note |
||
| 1164 | * |
||
| 1165 | * @return Shipping |
||
| 1166 | */ |
||
| 1167 | public function setNote($note = null) |
||
| 1173 | |||
| 1174 | /** |
||
| 1175 | * Get note. |
||
| 1176 | * |
||
| 1177 | * @return string|null |
||
| 1178 | */ |
||
| 1179 | 7 | public function getNote() |
|
| 1183 | |||
| 1184 | /** |
||
| 1185 | * Set ShippingStatus. |
||
| 1186 | * |
||
| 1187 | * @param ShippingStatus $ShippingStatus |
||
| 1188 | * |
||
| 1189 | * @return $this |
||
| 1190 | */ |
||
| 1191 | 186 | public function setShippingStatus(ShippingStatus $ShippingStatus) |
|
| 1197 | |||
| 1198 | /** |
||
| 1199 | * Get ShippingStatus |
||
| 1200 | * |
||
| 1201 | * @return ShippingStatus |
||
| 1202 | */ |
||
| 1203 | 11 | public function getShippingStatus() |
|
| 1207 | |||
| 1208 | /** |
||
| 1209 | * Set timeId |
||
| 1210 | * |
||
| 1211 | * @param integer $timeId |
||
| 1212 | * |
||
| 1213 | * @return Shipping |
||
| 1214 | */ |
||
| 1215 | 20 | public function setTimeId($timeId) |
|
| 1221 | |||
| 1222 | /** |
||
| 1223 | * Get timeId |
||
| 1224 | * |
||
| 1225 | * @return integer |
||
| 1226 | */ |
||
| 1227 | 6 | public function getTimeId() |
|
| 1231 | |||
| 1232 | /** |
||
| 1233 | * Set feeId |
||
| 1234 | * |
||
| 1235 | * @param integer $feeId |
||
| 1236 | * |
||
| 1237 | * @return Shipping |
||
| 1238 | */ |
||
| 1239 | 185 | public function setFeeId($feeId) |
|
| 1245 | |||
| 1246 | /** |
||
| 1247 | * Get feeId |
||
| 1248 | * |
||
| 1249 | * @return integer |
||
| 1250 | */ |
||
| 1251 | public function getFeeId() |
||
| 1255 | |||
| 1256 | /** |
||
| 1257 | * Set creator. |
||
| 1258 | * |
||
| 1259 | * @param \Eccube\Entity\Member|null $creator |
||
| 1260 | * |
||
| 1261 | * @return Shipping |
||
| 1262 | */ |
||
| 1263 | 7 | public function setCreator(\Eccube\Entity\Member $creator = null) |
|
| 1269 | |||
| 1270 | /** |
||
| 1271 | * Get creator. |
||
| 1272 | * |
||
| 1273 | * @return \Eccube\Entity\Member|null |
||
| 1274 | */ |
||
| 1275 | 5 | public function getCreator() |
|
| 1279 | } |
||
| 1280 |
This check marks private properties in classes that are never used. Those properties can be removed.