Complex classes like MembershipApplication 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 MembershipApplication, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 15 | class MembershipApplication { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var integer|null |
||
| 19 | * |
||
| 20 | * @ORM\Column(name="donation_id", type="integer", nullable=true) |
||
| 21 | */ |
||
| 22 | private $donationId; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var \DateTime |
||
| 26 | * |
||
| 27 | * @Gedmo\Timestampable(on="create") |
||
| 28 | * @ORM\Column(name="timestamp", type="datetime") |
||
| 29 | */ |
||
| 30 | private $creationTime; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var string|null |
||
| 34 | * |
||
| 35 | * @ORM\Column(name="anrede", type="string", length=16, nullable=true) |
||
| 36 | */ |
||
| 37 | private $applicantSalutation; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @var string|null |
||
| 41 | * |
||
| 42 | * @ORM\Column(name="firma", type="string", length=100, nullable=true) |
||
| 43 | */ |
||
| 44 | private $company; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @var string|null |
||
| 48 | * |
||
| 49 | * @ORM\Column(name="titel", type="string", length=16, nullable=true) |
||
| 50 | */ |
||
| 51 | private $applicantTitle; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @var string |
||
| 55 | * |
||
| 56 | * @ORM\Column(name="name", type="string", length=250, options={"default":""}, nullable=false) |
||
| 57 | */ |
||
| 58 | private $name = ''; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @var string |
||
| 62 | * |
||
| 63 | * @ORM\Column(name="vorname", type="string", length=50, options={"default":""}, nullable=false) |
||
| 64 | */ |
||
| 65 | private $applicantFirstName = ''; |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @var string |
||
| 69 | * |
||
| 70 | * @ORM\Column(name="nachname", type="string", length=50, options={"default":""}, nullable=false) |
||
| 71 | */ |
||
| 72 | private $applicantLastName = ''; |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @var string|null |
||
| 76 | * |
||
| 77 | * @ORM\Column(name="strasse", type="string", length=100, nullable=true) |
||
| 78 | */ |
||
| 79 | private $address; |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @var string|null |
||
| 83 | * |
||
| 84 | * @ORM\Column(name="plz", type="string", length=8, nullable=true) |
||
| 85 | */ |
||
| 86 | private $postcode; |
||
| 87 | |||
| 88 | /** |
||
| 89 | * @var string|null |
||
| 90 | * |
||
| 91 | * @ORM\Column(name="ort", type="string", length=100, nullable=true) |
||
| 92 | */ |
||
| 93 | private $city; |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @var string|null |
||
| 97 | * |
||
| 98 | * @ORM\Column(name="country", type="string", length=8, options={"default":""}, nullable=true) |
||
| 99 | */ |
||
| 100 | private $country = ''; |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @var string |
||
| 104 | * |
||
| 105 | * @ORM\Column(name="email", type="string", length=250, options={"default":""}, nullable=false) |
||
| 106 | */ |
||
| 107 | private $applicantEmailAddress = ''; |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @var string |
||
| 111 | * |
||
| 112 | * @ORM\Column(name="phone", type="string", length=30, options={"default":""}, nullable=false) |
||
| 113 | */ |
||
| 114 | private $applicantPhoneNumber = ''; |
||
| 115 | |||
| 116 | /** |
||
| 117 | * Date of birth |
||
| 118 | * |
||
| 119 | * @var \DateTime|null |
||
| 120 | * |
||
| 121 | * @ORM\Column(name="dob", type="date", nullable=true) |
||
| 122 | */ |
||
| 123 | private $applicantDateOfBirth; |
||
| 124 | |||
| 125 | /** |
||
| 126 | * @var string |
||
| 127 | * |
||
| 128 | * @ORM\Column(name="wikimedium_shipping", type="string", options={"default":""}, nullable=false) |
||
| 129 | */ |
||
| 130 | private $wikimediumShipping = 'none'; |
||
| 131 | |||
| 132 | /** |
||
| 133 | * @var string |
||
| 134 | * |
||
| 135 | * @ORM\Column(name="membership_type", type="string", options={"default":"sustaining"}, nullable=false) |
||
| 136 | */ |
||
| 137 | private $membershipType = 'sustaining'; |
||
| 138 | |||
| 139 | /** |
||
| 140 | * @var integer |
||
| 141 | * |
||
| 142 | * @ORM\Column(name="membership_fee", type="integer", options={"default":0}, nullable=false) |
||
| 143 | */ |
||
| 144 | private $paymentAmountInEuro = 0; |
||
| 145 | |||
| 146 | /** |
||
| 147 | * FIXME: this should not be nullable |
||
| 148 | * |
||
| 149 | * @var integer |
||
| 150 | * |
||
| 151 | * @ORM\Column(name="membership_fee_interval", type="smallint", options={"default":12}, nullable=true) |
||
| 152 | */ |
||
| 153 | private $paymentIntervalInMonths = 12; |
||
| 154 | |||
| 155 | /** |
||
| 156 | * @var string |
||
| 157 | * |
||
| 158 | * @ORM\Column(name="account_number", type="string", length=16, options={"default":""}, nullable=false) |
||
| 159 | */ |
||
| 160 | private $paymentBankAccount = ''; |
||
| 161 | |||
| 162 | /** |
||
| 163 | * @var string |
||
| 164 | * |
||
| 165 | * @ORM\Column(name="bank_name", type="string", length=50, options={"default":""}, nullable=false) |
||
| 166 | */ |
||
| 167 | private $paymentBankName = ''; |
||
| 168 | |||
| 169 | /** |
||
| 170 | * @var string |
||
| 171 | * |
||
| 172 | * @ORM\Column(name="bank_code", type="string", length=16, options={"default":""}, nullable=false) |
||
| 173 | */ |
||
| 174 | private $paymentBankCode = ''; |
||
| 175 | |||
| 176 | /** |
||
| 177 | * @var string|null |
||
| 178 | * |
||
| 179 | * @ORM\Column(name="iban", type="string", length=32, options={"default":""}, nullable=true) |
||
| 180 | */ |
||
| 181 | private $paymentIban = ''; |
||
| 182 | |||
| 183 | /** |
||
| 184 | * @var string|null |
||
| 185 | * |
||
| 186 | * @ORM\Column(name="bic", type="string", length=32, options={"default":""}, nullable=true) |
||
| 187 | */ |
||
| 188 | private $paymentBic = ''; |
||
| 189 | |||
| 190 | /** |
||
| 191 | * @var string |
||
| 192 | * |
||
| 193 | * @ORM\Column(name="account_holder", type="string", length=50, options={"default":""}, nullable=false) |
||
| 194 | */ |
||
| 195 | private $paymentBankAccountHolder = ''; |
||
| 196 | |||
| 197 | /** |
||
| 198 | * @var string |
||
| 199 | * |
||
| 200 | * @ORM\Column(name="comment", type="text", options={"default":""}, nullable=false) |
||
| 201 | */ |
||
| 202 | private $comment = ''; |
||
| 203 | |||
| 204 | /** |
||
| 205 | * @var \DateTime|null |
||
| 206 | * |
||
| 207 | * @ORM\Column(name="export", type="datetime", nullable=true) |
||
| 208 | */ |
||
| 209 | private $export; |
||
| 210 | |||
| 211 | /** |
||
| 212 | * @var \DateTime|null |
||
| 213 | * |
||
| 214 | * @ORM\Column(name="backup", type="datetime", nullable=true) |
||
| 215 | */ |
||
| 216 | private $backup; |
||
| 217 | |||
| 218 | /** |
||
| 219 | * @var boolean |
||
| 220 | * |
||
| 221 | * @ORM\Column(name="wikilogin", type="boolean", options={"default":0}, nullable=false) |
||
| 222 | */ |
||
| 223 | private $wikilogin = 0; |
||
| 224 | |||
| 225 | /** |
||
| 226 | * @var string|null |
||
| 227 | * |
||
| 228 | * @ORM\Column(name="tracking", type="string", length=50, nullable=true) |
||
| 229 | */ |
||
| 230 | private $tracking; |
||
| 231 | |||
| 232 | /** |
||
| 233 | * FIXME: this should not be nullable |
||
| 234 | * |
||
| 235 | * @var integer |
||
| 236 | * |
||
| 237 | * @ORM\Column(name="status", type="smallint", options={"default":0}, nullable=true) |
||
| 238 | */ |
||
| 239 | private $status = 0; |
||
| 240 | |||
| 241 | /** |
||
| 242 | * @var string|null |
||
| 243 | * |
||
| 244 | * @ORM\Column(name="data", type="text", nullable=true) |
||
| 245 | */ |
||
| 246 | private $data; |
||
| 247 | |||
| 248 | /** |
||
| 249 | * @var integer |
||
| 250 | * |
||
| 251 | * @ORM\Column(name="id", type="integer") |
||
| 252 | * @ORM\Id |
||
| 253 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
| 254 | */ |
||
| 255 | private $id; |
||
| 256 | |||
| 257 | const STATUS_CONFIRMED = 1; |
||
| 258 | const STATUS_NEUTRAL = 0; |
||
| 259 | const STATUS_DELETED = -1; |
||
| 260 | const STATUS_MODERATION = -2; |
||
| 261 | const STATUS_ABORTED = -4; |
||
| 262 | const STATUS_CANCELED = -8; |
||
| 263 | |||
| 264 | /** |
||
| 265 | * @return integer |
||
| 266 | */ |
||
| 267 | public function getId() { |
||
| 270 | |||
| 271 | /** |
||
| 272 | * @since 2.0 |
||
| 273 | * |
||
| 274 | * @param integer|null $id |
||
| 275 | */ |
||
| 276 | public function setId( $id ) { |
||
| 279 | |||
| 280 | /** |
||
| 281 | * @param integer|null $donationId |
||
| 282 | * |
||
| 283 | * @return self |
||
| 284 | */ |
||
| 285 | public function setDonationId( $donationId ) { |
||
| 290 | |||
| 291 | /** |
||
| 292 | * Returns the id of the donation that led to the membership application, |
||
| 293 | * or null when the application is not linked to any donation. |
||
| 294 | * |
||
| 295 | * @return integer|null |
||
| 296 | */ |
||
| 297 | public function getDonationId() { |
||
| 300 | |||
| 301 | /** |
||
| 302 | * @param \DateTime $creationTime |
||
| 303 | * |
||
| 304 | * @return self |
||
| 305 | */ |
||
| 306 | public function setCreationTime( $creationTime ) { |
||
| 307 | $this->creationTime = $creationTime; |
||
| 308 | |||
| 309 | return $this; |
||
| 310 | } |
||
| 311 | |||
| 312 | /** |
||
| 313 | * @return \DateTime |
||
| 314 | */ |
||
| 315 | public function getCreationTime() { |
||
| 316 | return $this->creationTime; |
||
| 317 | } |
||
| 318 | |||
| 319 | /** |
||
| 320 | * @param string|null $applicantSalutation |
||
| 321 | * |
||
| 322 | * @return self |
||
| 323 | */ |
||
| 324 | public function setApplicantSalutation( $applicantSalutation ) { |
||
| 325 | $this->applicantSalutation = $applicantSalutation; |
||
| 326 | |||
| 327 | return $this; |
||
| 328 | } |
||
| 329 | |||
| 330 | /** |
||
| 331 | * @return string|null |
||
| 332 | */ |
||
| 333 | public function getApplicantSalutation() { |
||
| 334 | return $this->applicantSalutation; |
||
| 335 | } |
||
| 336 | |||
| 337 | /** |
||
| 338 | * @param string|null $company |
||
| 339 | * |
||
| 340 | * @return self |
||
| 341 | */ |
||
| 342 | public function setCompany( $company ) { |
||
| 347 | |||
| 348 | /** |
||
| 349 | * @return string|null |
||
| 350 | */ |
||
| 351 | public function getCompany() { |
||
| 354 | |||
| 355 | /** |
||
| 356 | * @param string $applicantTitle |
||
| 357 | * |
||
| 358 | * @return self |
||
| 359 | */ |
||
| 360 | public function setApplicantTitle( $applicantTitle ) { |
||
| 361 | $this->applicantTitle = $applicantTitle; |
||
| 362 | |||
| 363 | return $this; |
||
| 364 | } |
||
| 365 | |||
| 366 | /** |
||
| 367 | * @return string |
||
| 368 | */ |
||
| 369 | public function getApplicantTitle() { |
||
| 370 | return $this->applicantTitle; |
||
| 371 | } |
||
| 372 | |||
| 373 | /** |
||
| 374 | * @param string $name |
||
| 375 | * |
||
| 376 | * @return self |
||
| 377 | */ |
||
| 378 | public function setName( $name ) { |
||
| 383 | |||
| 384 | /** |
||
| 385 | * @return string |
||
| 386 | */ |
||
| 387 | public function getName() { |
||
| 390 | |||
| 391 | /** |
||
| 392 | * @param string $applicantFirstName |
||
| 393 | * |
||
| 394 | * @return self |
||
| 395 | */ |
||
| 396 | public function setApplicantFirstName( $applicantFirstName ) { |
||
| 397 | $this->applicantFirstName = $applicantFirstName; |
||
| 398 | $this->setNameFromParts( $applicantFirstName, $this->getApplicantLastName() ); |
||
| 399 | |||
| 400 | return $this; |
||
| 401 | } |
||
| 402 | |||
| 403 | /** |
||
| 404 | * @return string |
||
| 405 | */ |
||
| 406 | public function getApplicantFirstName() { |
||
| 407 | return $this->applicantFirstName; |
||
| 408 | } |
||
| 409 | |||
| 410 | /** |
||
| 411 | * @param string $applicantLastName |
||
| 412 | * |
||
| 413 | * @return self |
||
| 414 | */ |
||
| 415 | public function setApplicantLastName( $applicantLastName ) { |
||
| 416 | $this->applicantLastName = $applicantLastName; |
||
| 417 | $this->setNameFromParts( $this->getApplicantFirstName(), $applicantLastName ); |
||
| 418 | |||
| 419 | return $this; |
||
| 420 | } |
||
| 421 | |||
| 422 | /** |
||
| 423 | * @return string |
||
| 424 | */ |
||
| 425 | public function getApplicantLastName() { |
||
| 426 | return $this->applicantLastName; |
||
| 427 | } |
||
| 428 | |||
| 429 | /** |
||
| 430 | * Sets the full name |
||
| 431 | * |
||
| 432 | * @param string|null $firstName |
||
| 433 | * @param string|null $lastName |
||
| 434 | * |
||
| 435 | * @return self |
||
| 436 | */ |
||
| 437 | private function setNameFromParts( $firstName, $lastName ) { |
||
| 445 | |||
| 446 | /** |
||
| 447 | * Set address (street, etc) |
||
| 448 | * |
||
| 449 | * @param string|null $address |
||
| 450 | * |
||
| 451 | * @return self |
||
| 452 | */ |
||
| 453 | public function setAddress( $address ) { |
||
| 458 | |||
| 459 | /** |
||
| 460 | * Get address (street, etc) |
||
| 461 | * |
||
| 462 | * @return string|null |
||
| 463 | */ |
||
| 464 | public function getAddress() { |
||
| 467 | |||
| 468 | /** |
||
| 469 | * @param string|null $postcode |
||
| 470 | * |
||
| 471 | * @return self |
||
| 472 | */ |
||
| 473 | public function setPostcode( $postcode ) { |
||
| 478 | |||
| 479 | /** |
||
| 480 | * @return string|null |
||
| 481 | */ |
||
| 482 | public function getPostcode() { |
||
| 485 | |||
| 486 | /** |
||
| 487 | * @param string|null $city |
||
| 488 | * |
||
| 489 | * @return self |
||
| 490 | */ |
||
| 491 | public function setCity( $city ) { |
||
| 496 | |||
| 497 | /** |
||
| 498 | * @return string|null |
||
| 499 | */ |
||
| 500 | public function getCity() { |
||
| 503 | |||
| 504 | /** |
||
| 505 | * Set email |
||
| 506 | * |
||
| 507 | * @param string $applicantEmailAddress |
||
| 508 | * |
||
| 509 | * @return self |
||
| 510 | */ |
||
| 511 | public function setApplicantEmailAddress( $applicantEmailAddress ) { |
||
| 512 | $this->applicantEmailAddress = $applicantEmailAddress; |
||
| 513 | |||
| 516 | |||
| 517 | /** |
||
| 518 | * Get email |
||
| 519 | * |
||
| 520 | * @return string |
||
| 521 | */ |
||
| 522 | public function getApplicantEmailAddress() { |
||
| 525 | |||
| 526 | /** |
||
| 527 | * Set phone |
||
| 528 | * |
||
| 529 | * @param string $applicantPhoneNumber |
||
| 530 | * |
||
| 531 | * @return self |
||
| 532 | */ |
||
| 533 | public function setApplicantPhoneNumber( $applicantPhoneNumber ) { |
||
| 538 | |||
| 539 | /** |
||
| 540 | * Get phone |
||
| 541 | * |
||
| 542 | * @return string |
||
| 543 | */ |
||
| 544 | public function getApplicantPhoneNumber() { |
||
| 547 | |||
| 548 | /** |
||
| 549 | * @param \DateTime|null $dateOfBirth |
||
| 550 | * |
||
| 551 | * @return self |
||
| 552 | */ |
||
| 553 | public function setApplicantDateOfBirth( $dateOfBirth ) { |
||
| 558 | |||
| 559 | /** |
||
| 560 | * @return \DateTime|null |
||
| 561 | */ |
||
| 562 | public function getApplicantDateOfBirth() { |
||
| 565 | |||
| 566 | /** |
||
| 567 | * @param string $wikimediumShipping |
||
| 568 | * |
||
| 569 | * @return self |
||
| 570 | */ |
||
| 571 | public function setWikimediumShipping( $wikimediumShipping ) { |
||
| 576 | |||
| 577 | /** |
||
| 578 | * @return string |
||
| 579 | */ |
||
| 580 | public function getWikimediumShipping() { |
||
| 583 | |||
| 584 | /** |
||
| 585 | * @param string $membershipType |
||
| 586 | * |
||
| 587 | * @return self |
||
| 588 | */ |
||
| 589 | public function setMembershipType( $membershipType ) { |
||
| 594 | |||
| 595 | /** |
||
| 596 | * @return string |
||
| 597 | */ |
||
| 598 | public function getMembershipType() { |
||
| 601 | |||
| 602 | /** |
||
| 603 | * @param integer $paymentAmountInEuro |
||
| 604 | * |
||
| 605 | * @return self |
||
| 606 | */ |
||
| 607 | public function setPaymentAmount( $paymentAmountInEuro ) { |
||
| 612 | |||
| 613 | /** |
||
| 614 | * @return integer |
||
| 615 | */ |
||
| 616 | public function getPaymentAmount() { |
||
| 619 | |||
| 620 | /** |
||
| 621 | * @param integer $paymentIntervalInMonths |
||
| 622 | * |
||
| 623 | * @return self |
||
| 624 | */ |
||
| 625 | public function setPaymentIntervalInMonths($paymentIntervalInMonths) { |
||
| 630 | |||
| 631 | /** |
||
| 632 | * @return integer |
||
| 633 | */ |
||
| 634 | public function getPaymentIntervalInMonths() { |
||
| 637 | |||
| 638 | |||
| 639 | /** |
||
| 640 | * @param string $paymentBankAccount |
||
| 641 | * |
||
| 642 | * @return self |
||
| 643 | */ |
||
| 644 | public function setPaymentBankAccount( $paymentBankAccount ) { |
||
| 649 | |||
| 650 | /** |
||
| 651 | * @return string |
||
| 652 | */ |
||
| 653 | public function getPaymentBankAccount() { |
||
| 656 | |||
| 657 | /** |
||
| 658 | * @param string $paymentBankName |
||
| 659 | * |
||
| 660 | * @return self |
||
| 661 | */ |
||
| 662 | public function setPaymentBankName( $paymentBankName ) { |
||
| 667 | |||
| 668 | /** |
||
| 669 | * @return string |
||
| 670 | */ |
||
| 671 | public function getPaymentBankName() { |
||
| 674 | |||
| 675 | /** |
||
| 676 | * @param string $paymentBankCode |
||
| 677 | * |
||
| 678 | * @return self |
||
| 679 | */ |
||
| 680 | public function setPaymentBankCode( $paymentBankCode ) { |
||
| 685 | |||
| 686 | /** |
||
| 687 | * @return string |
||
| 688 | */ |
||
| 689 | public function getPaymentBankCode() { |
||
| 692 | |||
| 693 | /** |
||
| 694 | * @param string|null $paymentIban |
||
| 695 | * |
||
| 696 | * @return self |
||
| 697 | */ |
||
| 698 | public function setPaymentIban( $paymentIban ) { |
||
| 703 | |||
| 704 | /** |
||
| 705 | * @return string|null |
||
| 706 | */ |
||
| 707 | public function getPaymentIban() { |
||
| 710 | |||
| 711 | /** |
||
| 712 | * @param string|null $paymentBic |
||
| 713 | * |
||
| 714 | * @return self |
||
| 715 | */ |
||
| 716 | public function setPaymentBic( $paymentBic ) { |
||
| 721 | |||
| 722 | /** |
||
| 723 | * @return string|null |
||
| 724 | */ |
||
| 725 | public function getPaymentBic() { |
||
| 728 | |||
| 729 | /** |
||
| 730 | * @param string $paymentBankAccountHolder |
||
| 731 | * |
||
| 732 | * @return self |
||
| 733 | */ |
||
| 734 | public function setPaymentBankAccountHolder( $paymentBankAccountHolder ) { |
||
| 739 | |||
| 740 | /** |
||
| 741 | * @return string |
||
| 742 | */ |
||
| 743 | public function getPaymentBankAccountHolder() { |
||
| 746 | |||
| 747 | /** |
||
| 748 | * @param string $comment |
||
| 749 | * |
||
| 750 | * @return self |
||
| 751 | */ |
||
| 752 | public function setComment( $comment ) { |
||
| 757 | |||
| 758 | /** |
||
| 759 | * @return string |
||
| 760 | */ |
||
| 761 | public function getComment() { |
||
| 764 | |||
| 765 | /** |
||
| 766 | * Sets the time of export. |
||
| 767 | * |
||
| 768 | * @param \DateTime|null $export |
||
| 769 | * |
||
| 770 | * @return self |
||
| 771 | */ |
||
| 772 | public function setExport( $export ) { |
||
| 777 | |||
| 778 | /** |
||
| 779 | * Returns the time of export. |
||
| 780 | * |
||
| 781 | * @return \DateTime|null |
||
| 782 | */ |
||
| 783 | public function getExport() { |
||
| 786 | |||
| 787 | /** |
||
| 788 | * Sets the time of backup. |
||
| 789 | * |
||
| 790 | * @param \DateTime|null $backup |
||
| 791 | * |
||
| 792 | * @return self |
||
| 793 | */ |
||
| 794 | public function setBackup( $backup ) { |
||
| 799 | |||
| 800 | /** |
||
| 801 | * Returns the time of backup. |
||
| 802 | * |
||
| 803 | * @return \DateTime|null |
||
| 804 | */ |
||
| 805 | public function getBackup() { |
||
| 808 | |||
| 809 | /** |
||
| 810 | * @param boolean $wikilogin |
||
| 811 | * |
||
| 812 | * @return self |
||
| 813 | */ |
||
| 814 | public function setWikilogin( $wikilogin ) { |
||
| 819 | |||
| 820 | /** |
||
| 821 | * @return boolean |
||
| 822 | */ |
||
| 823 | public function getWikilogin() { |
||
| 826 | |||
| 827 | /** |
||
| 828 | * @param string|null $tracking |
||
| 829 | * |
||
| 830 | * @return self |
||
| 831 | */ |
||
| 832 | public function setTracking( $tracking ) { |
||
| 837 | |||
| 838 | /** |
||
| 839 | * @return string|null |
||
| 840 | */ |
||
| 841 | public function getTracking() { |
||
| 844 | |||
| 845 | /** |
||
| 846 | * Sets the status of the membership request. |
||
| 847 | * The allowed values are the STATUS_ constants in this class. |
||
| 848 | * |
||
| 849 | * @param integer $status |
||
| 850 | * |
||
| 851 | * @return self |
||
| 852 | */ |
||
| 853 | public function setStatus( $status ) { |
||
| 858 | |||
| 859 | /** |
||
| 860 | * Returns the status of the membership request. |
||
| 861 | * The possible values are the STATUS_ constants in this class. |
||
| 862 | * |
||
| 863 | * @return integer |
||
| 864 | */ |
||
| 865 | public function getStatus() { |
||
| 868 | |||
| 869 | /** |
||
| 870 | * @param string|null $country |
||
| 871 | * |
||
| 872 | * @return self |
||
| 873 | */ |
||
| 874 | public function setCountry( $country ) { |
||
| 879 | |||
| 880 | /** |
||
| 881 | * @return string|null |
||
| 882 | */ |
||
| 883 | public function getCountry() { |
||
| 886 | |||
| 887 | /** |
||
| 888 | * @param string|null $data |
||
| 889 | * @return self |
||
| 890 | */ |
||
| 891 | public function setData( $data ) { |
||
| 896 | |||
| 897 | /** |
||
| 898 | * @return string|null |
||
| 899 | */ |
||
| 900 | public function getData() { |
||
| 903 | |||
| 904 | public function isUnconfirmed() { |
||
| 907 | |||
| 908 | public function log( $message ) { |
||
| 915 | |||
| 916 | /** |
||
| 917 | * NOTE: if possible, use @see getDataObject instead, as it provides a nicer API. |
||
| 918 | * |
||
| 919 | * @since 2.0 |
||
| 920 | * @return array |
||
| 921 | */ |
||
| 922 | public function getDecodedData() { |
||
| 927 | |||
| 928 | /** |
||
| 929 | * NOTE: if possible, use @see modifyDataObject instead, as it provides a nicer API. |
||
| 930 | * |
||
| 931 | * @since 2.0 |
||
| 932 | * @param array $data |
||
|
|
|||
| 933 | */ |
||
| 934 | public function encodeAndSetData( array $dataArray ) { |
||
| 937 | |||
| 938 | /** |
||
| 939 | * WARNING: updates made to the return value will not be reflected in the Donation state. |
||
| 940 | * Similarly, updates to the Donation state will not propagate to the returned object. |
||
| 941 | * To update the Donation state, explicitly call @see setDataObject. |
||
| 942 | * |
||
| 943 | * @since 2.0 |
||
| 944 | * @return MembershipApplicationData |
||
| 945 | */ |
||
| 946 | public function getDataObject() { |
||
| 956 | |||
| 957 | /** |
||
| 958 | * @since 2.0 |
||
| 959 | * @param MembershipApplicationData $data |
||
| 960 | */ |
||
| 961 | public function setDataObject( MembershipApplicationData $data ) { |
||
| 978 | |||
| 979 | /** |
||
| 980 | * @since 2.0 |
||
| 981 | * @param callable $modificationFunction Takes a modifiable MembershipApplicationData parameter |
||
| 982 | */ |
||
| 983 | public function modifyDataObject( callable $modificationFunction ) { |
||
| 988 | |||
| 989 | } |
||
| 990 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.