Complex classes like DoctrineMembershipApplication 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 DoctrineMembershipApplication, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 15 | class DoctrineMembershipApplication { |
||
| 16 | |||
| 17 | const STATUS_CONFIRMED = 1; |
||
| 18 | const STATUS_NEUTRAL = 0; |
||
| 19 | const STATUS_DELETED = -1; |
||
| 20 | const STATUS_MODERATION = -2; |
||
| 21 | const STATUS_ABORTED = -4; |
||
| 22 | const STATUS_CANCELED = -8; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var integer |
||
| 26 | * |
||
| 27 | * @ORM\Column(name="id", type="integer") |
||
| 28 | * @ORM\Id |
||
| 29 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
| 30 | */ |
||
| 31 | private $id; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * FIXME: this should not be nullable |
||
| 35 | * |
||
| 36 | * @var integer |
||
| 37 | * |
||
| 38 | * @ORM\Column(name="status", type="smallint", options={"default":0}, nullable=true) |
||
| 39 | */ |
||
| 40 | private $status = 0; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @var integer|null |
||
| 44 | * |
||
| 45 | * @ORM\Column(name="donation_id", type="integer", nullable=true) |
||
| 46 | */ |
||
| 47 | private $donationId; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @var \DateTime |
||
| 51 | * |
||
| 52 | * @Gedmo\Timestampable(on="create") |
||
| 53 | * @ORM\Column(name="timestamp", type="datetime") |
||
| 54 | */ |
||
| 55 | private $creationTime; |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @var string|null |
||
| 59 | * |
||
| 60 | * @ORM\Column(name="anrede", type="string", length=16, nullable=true) |
||
| 61 | */ |
||
| 62 | private $applicantSalutation; |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @var string|null |
||
| 66 | * |
||
| 67 | * @ORM\Column(name="firma", type="string", length=100, nullable=true) |
||
| 68 | */ |
||
| 69 | private $company; |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @var string|null |
||
| 73 | * |
||
| 74 | * @ORM\Column(name="titel", type="string", length=16, nullable=true) |
||
| 75 | */ |
||
| 76 | private $applicantTitle; |
||
| 77 | |||
| 78 | /** |
||
| 79 | * @var string |
||
| 80 | * |
||
| 81 | * @ORM\Column(name="name", type="string", length=250, options={"default":""}, nullable=false) |
||
| 82 | */ |
||
| 83 | private $probablyUnusedNameField = ''; |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @var string |
||
| 87 | * |
||
| 88 | * @ORM\Column(name="vorname", type="string", length=50, options={"default":""}, nullable=false) |
||
| 89 | */ |
||
| 90 | private $applicantFirstName = ''; |
||
| 91 | |||
| 92 | /** |
||
| 93 | * @var string |
||
| 94 | * |
||
| 95 | * @ORM\Column(name="nachname", type="string", length=50, options={"default":""}, nullable=false) |
||
| 96 | */ |
||
| 97 | private $applicantLastName = ''; |
||
| 98 | |||
| 99 | /** |
||
| 100 | * @var string|null |
||
| 101 | * |
||
| 102 | * @ORM\Column(name="strasse", type="string", length=100, nullable=true) |
||
| 103 | */ |
||
| 104 | private $address; |
||
| 105 | |||
| 106 | /** |
||
| 107 | * @var string|null |
||
| 108 | * |
||
| 109 | * @ORM\Column(name="plz", type="string", length=8, nullable=true) |
||
| 110 | */ |
||
| 111 | private $postcode; |
||
| 112 | |||
| 113 | /** |
||
| 114 | * @var string|null |
||
| 115 | * |
||
| 116 | * @ORM\Column(name="ort", type="string", length=100, nullable=true) |
||
| 117 | */ |
||
| 118 | private $city; |
||
| 119 | |||
| 120 | /** |
||
| 121 | * @var string|null |
||
| 122 | * |
||
| 123 | * @ORM\Column(name="country", type="string", length=8, options={"default":""}, nullable=true) |
||
| 124 | */ |
||
| 125 | private $country = ''; |
||
| 126 | |||
| 127 | /** |
||
| 128 | * @var string |
||
| 129 | * |
||
| 130 | * @ORM\Column(name="email", type="string", length=250, options={"default":""}, nullable=false) |
||
| 131 | */ |
||
| 132 | private $applicantEmailAddress = ''; |
||
| 133 | |||
| 134 | /** |
||
| 135 | * @var string |
||
| 136 | * |
||
| 137 | * @ORM\Column(name="phone", type="string", length=30, options={"default":""}, nullable=false) |
||
| 138 | */ |
||
| 139 | private $applicantPhoneNumber = ''; |
||
| 140 | |||
| 141 | /** |
||
| 142 | * Date of birth |
||
| 143 | * |
||
| 144 | * @var \DateTime|null |
||
| 145 | * |
||
| 146 | * @ORM\Column(name="dob", type="date", nullable=true) |
||
| 147 | */ |
||
| 148 | private $applicantDateOfBirth; |
||
| 149 | |||
| 150 | /** |
||
| 151 | * @var string |
||
| 152 | * |
||
| 153 | * @ORM\Column(name="wikimedium_shipping", type="string", options={"default":""}, nullable=false) |
||
| 154 | */ |
||
| 155 | private $wikimediumShipping = 'none'; |
||
| 156 | |||
| 157 | /** |
||
| 158 | * @var string |
||
| 159 | * |
||
| 160 | * @ORM\Column(name="membership_type", type="string", options={"default":"sustaining"}, nullable=false) |
||
| 161 | */ |
||
| 162 | private $membershipType = 'sustaining'; |
||
| 163 | |||
| 164 | /** |
||
| 165 | * @var string |
||
| 166 | * |
||
| 167 | * @ORM\Column(name="payment_type", type="string", options={"default":"BEZ"}, nullable=false) |
||
| 168 | */ |
||
| 169 | private $paymentType = 'BEZ'; |
||
| 170 | |||
| 171 | /** |
||
| 172 | * @var integer |
||
| 173 | * |
||
| 174 | * @ORM\Column(name="membership_fee", type="integer", options={"default":0}, nullable=false) |
||
| 175 | */ |
||
| 176 | private $paymentAmountInEuro = 0; |
||
| 177 | |||
| 178 | /** |
||
| 179 | * FIXME: this should not be nullable |
||
| 180 | * |
||
| 181 | * @var integer |
||
| 182 | * |
||
| 183 | * @ORM\Column(name="membership_fee_interval", type="smallint", options={"default":12}, nullable=true) |
||
| 184 | */ |
||
| 185 | private $paymentIntervalInMonths = 12; |
||
| 186 | |||
| 187 | /** |
||
| 188 | * @var string |
||
| 189 | * |
||
| 190 | * @ORM\Column(name="account_number", type="string", length=16, options={"default":""}, nullable=false) |
||
| 191 | */ |
||
| 192 | private $paymentBankAccount = ''; |
||
| 193 | |||
| 194 | /** |
||
| 195 | * @var string |
||
| 196 | * |
||
| 197 | * @ORM\Column(name="bank_name", type="string", length=50, options={"default":""}, nullable=false) |
||
| 198 | */ |
||
| 199 | private $paymentBankName = ''; |
||
| 200 | |||
| 201 | /** |
||
| 202 | * @var string |
||
| 203 | * |
||
| 204 | * @ORM\Column(name="bank_code", type="string", length=16, options={"default":""}, nullable=false) |
||
| 205 | */ |
||
| 206 | private $paymentBankCode = ''; |
||
| 207 | |||
| 208 | /** |
||
| 209 | * @var string|null |
||
| 210 | * |
||
| 211 | * @ORM\Column(name="iban", type="string", length=32, options={"default":""}, nullable=true) |
||
| 212 | */ |
||
| 213 | private $paymentIban = ''; |
||
| 214 | |||
| 215 | /** |
||
| 216 | * @var string|null |
||
| 217 | * |
||
| 218 | * @ORM\Column(name="bic", type="string", length=32, options={"default":""}, nullable=true) |
||
| 219 | */ |
||
| 220 | private $paymentBic = ''; |
||
| 221 | |||
| 222 | /** |
||
| 223 | * @var string |
||
| 224 | * |
||
| 225 | * @ORM\Column(name="account_holder", type="string", length=50, options={"default":""}, nullable=false) |
||
| 226 | */ |
||
| 227 | private $paymentBankAccountHolder = ''; |
||
| 228 | |||
| 229 | /** |
||
| 230 | * @var string |
||
| 231 | * |
||
| 232 | * @ORM\Column(name="comment", type="text", options={"default":""}, nullable=false) |
||
| 233 | */ |
||
| 234 | private $comment = ''; |
||
| 235 | |||
| 236 | /** |
||
| 237 | * @var \DateTime|null |
||
| 238 | * |
||
| 239 | * @ORM\Column(name="export", type="datetime", nullable=true) |
||
| 240 | */ |
||
| 241 | private $export; |
||
| 242 | |||
| 243 | /** |
||
| 244 | * @var \DateTime|null |
||
| 245 | * |
||
| 246 | * @ORM\Column(name="backup", type="datetime", nullable=true) |
||
| 247 | */ |
||
| 248 | private $backup; |
||
| 249 | |||
| 250 | /** |
||
| 251 | * @var boolean |
||
| 252 | * |
||
| 253 | * @ORM\Column(name="wikilogin", type="boolean", options={"default":0}, nullable=false) |
||
| 254 | */ |
||
| 255 | private $wikilogin = 0; |
||
| 256 | |||
| 257 | /** |
||
| 258 | * @var string|null |
||
| 259 | * |
||
| 260 | * @ORM\Column(name="tracking", type="string", length=50, nullable=true) |
||
| 261 | */ |
||
| 262 | private $tracking; |
||
| 263 | |||
| 264 | /** |
||
| 265 | * @var string|null |
||
| 266 | * |
||
| 267 | * @ORM\Column(name="data", type="text", nullable=true) |
||
| 268 | */ |
||
| 269 | private $data; |
||
| 270 | |||
| 271 | /** |
||
| 272 | * @return integer |
||
| 273 | */ |
||
| 274 | public function getId() { |
||
| 277 | |||
| 278 | /** |
||
| 279 | * @since 2.0 |
||
| 280 | * |
||
| 281 | * @param integer|null $id |
||
| 282 | */ |
||
| 283 | public function setId( $id ) { |
||
| 286 | |||
| 287 | /** |
||
| 288 | * @param integer|null $donationId |
||
| 289 | * |
||
| 290 | * @return DoctrineMembershipApplication |
||
| 291 | */ |
||
| 292 | public function setDonationId( $donationId ) { |
||
| 297 | |||
| 298 | /** |
||
| 299 | * Returns the id of the donation that led to the membership application, |
||
| 300 | * or null when the application is not linked to any donation. |
||
| 301 | * |
||
| 302 | * @return integer|null |
||
| 303 | */ |
||
| 304 | public function getDonationId() { |
||
| 307 | |||
| 308 | /** |
||
| 309 | * @param \DateTime|null $creationTime |
||
| 310 | * |
||
| 311 | * @return DoctrineMembershipApplication |
||
| 312 | */ |
||
| 313 | public function setCreationTime( $creationTime ) { |
||
| 318 | |||
| 319 | /** |
||
| 320 | * @return \DateTime|null |
||
| 321 | */ |
||
| 322 | public function getCreationTime() { |
||
| 325 | |||
| 326 | /** |
||
| 327 | * @param string|null $applicantSalutation |
||
| 328 | * |
||
| 329 | * @return DoctrineMembershipApplication |
||
| 330 | */ |
||
| 331 | public function setApplicantSalutation( $applicantSalutation ) { |
||
| 336 | |||
| 337 | /** |
||
| 338 | * @return string|null |
||
| 339 | */ |
||
| 340 | public function getApplicantSalutation() { |
||
| 343 | |||
| 344 | /** |
||
| 345 | * @param string|null $company |
||
| 346 | * |
||
| 347 | * @return DoctrineMembershipApplication |
||
| 348 | */ |
||
| 349 | public function setCompany( $company ) { |
||
| 354 | |||
| 355 | /** |
||
| 356 | * @return string|null |
||
| 357 | */ |
||
| 358 | public function getCompany() { |
||
| 361 | |||
| 362 | /** |
||
| 363 | * @param string $applicantTitle |
||
| 364 | * |
||
| 365 | * @return DoctrineMembershipApplication |
||
| 366 | */ |
||
| 367 | public function setApplicantTitle( $applicantTitle ) { |
||
| 372 | |||
| 373 | /** |
||
| 374 | * @return string |
||
| 375 | */ |
||
| 376 | public function getApplicantTitle() { |
||
| 379 | |||
| 380 | /** |
||
| 381 | * @param string $probablyUnusedNameField |
||
| 382 | * |
||
| 383 | * @return DoctrineMembershipApplication |
||
| 384 | */ |
||
| 385 | public function setProbablyUnusedNameField( $probablyUnusedNameField ) { |
||
| 390 | |||
| 391 | /** |
||
| 392 | * @return string |
||
| 393 | */ |
||
| 394 | public function getProbablyUnusedNameField() { |
||
| 397 | |||
| 398 | /** |
||
| 399 | * @param string $applicantFirstName |
||
| 400 | * |
||
| 401 | * @return DoctrineMembershipApplication |
||
| 402 | */ |
||
| 403 | public function setApplicantFirstName( $applicantFirstName ) { |
||
| 409 | |||
| 410 | /** |
||
| 411 | * @return string |
||
| 412 | */ |
||
| 413 | public function getApplicantFirstName() { |
||
| 416 | |||
| 417 | /** |
||
| 418 | * @param string $applicantLastName |
||
| 419 | * |
||
| 420 | * @return DoctrineMembershipApplication |
||
| 421 | */ |
||
| 422 | public function setApplicantLastName( $applicantLastName ) { |
||
| 428 | |||
| 429 | /** |
||
| 430 | * @return string |
||
| 431 | */ |
||
| 432 | public function getApplicantLastName() { |
||
| 435 | |||
| 436 | /** |
||
| 437 | * Sets the full name |
||
| 438 | * |
||
| 439 | * @param string|null $firstName |
||
| 440 | * @param string|null $lastName |
||
| 441 | * |
||
| 442 | * @return DoctrineMembershipApplication |
||
| 443 | */ |
||
| 444 | private function setNameFromParts( $firstName, $lastName ) { |
||
| 452 | |||
| 453 | /** |
||
| 454 | * Set address (street, etc) |
||
| 455 | * |
||
| 456 | * @param string|null $address |
||
| 457 | * |
||
| 458 | * @return DoctrineMembershipApplication |
||
| 459 | */ |
||
| 460 | public function setAddress( $address ) { |
||
| 465 | |||
| 466 | /** |
||
| 467 | * Get address (street, etc) |
||
| 468 | * |
||
| 469 | * @return string|null |
||
| 470 | */ |
||
| 471 | public function getAddress() { |
||
| 474 | |||
| 475 | /** |
||
| 476 | * @param string|null $postcode |
||
| 477 | * |
||
| 478 | * @return DoctrineMembershipApplication |
||
| 479 | */ |
||
| 480 | public function setPostcode( $postcode ) { |
||
| 485 | |||
| 486 | /** |
||
| 487 | * @return string|null |
||
| 488 | */ |
||
| 489 | public function getPostcode() { |
||
| 492 | |||
| 493 | /** |
||
| 494 | * @param string|null $city |
||
| 495 | * |
||
| 496 | * @return DoctrineMembershipApplication |
||
| 497 | */ |
||
| 498 | public function setCity( $city ) { |
||
| 503 | |||
| 504 | /** |
||
| 505 | * @return string|null |
||
| 506 | */ |
||
| 507 | public function getCity() { |
||
| 510 | |||
| 511 | /** |
||
| 512 | * Set email |
||
| 513 | * |
||
| 514 | * @param string $applicantEmailAddress |
||
| 515 | * |
||
| 516 | * @return DoctrineMembershipApplication |
||
| 517 | */ |
||
| 518 | public function setApplicantEmailAddress( $applicantEmailAddress ) { |
||
| 523 | |||
| 524 | /** |
||
| 525 | * Get email |
||
| 526 | * |
||
| 527 | * @return string |
||
| 528 | */ |
||
| 529 | public function getApplicantEmailAddress() { |
||
| 532 | |||
| 533 | /** |
||
| 534 | * Set phone |
||
| 535 | * |
||
| 536 | * @param string $applicantPhoneNumber |
||
| 537 | * |
||
| 538 | * @return DoctrineMembershipApplication |
||
| 539 | */ |
||
| 540 | public function setApplicantPhoneNumber( $applicantPhoneNumber ) { |
||
| 545 | |||
| 546 | /** |
||
| 547 | * Get phone |
||
| 548 | * |
||
| 549 | * @return string |
||
| 550 | */ |
||
| 551 | public function getApplicantPhoneNumber() { |
||
| 554 | |||
| 555 | /** |
||
| 556 | * @param \DateTime|null $dateOfBirth |
||
| 557 | * |
||
| 558 | * @return DoctrineMembershipApplication |
||
| 559 | */ |
||
| 560 | public function setApplicantDateOfBirth( $dateOfBirth ) { |
||
| 565 | |||
| 566 | /** |
||
| 567 | * @return \DateTime|null |
||
| 568 | */ |
||
| 569 | public function getApplicantDateOfBirth() { |
||
| 572 | |||
| 573 | /** |
||
| 574 | * @param string $wikimediumShipping |
||
| 575 | * |
||
| 576 | * @return DoctrineMembershipApplication |
||
| 577 | */ |
||
| 578 | public function setWikimediumShipping( $wikimediumShipping ) { |
||
| 583 | |||
| 584 | /** |
||
| 585 | * @return string |
||
| 586 | */ |
||
| 587 | public function getWikimediumShipping() { |
||
| 590 | |||
| 591 | /** |
||
| 592 | * @param string $membershipType |
||
| 593 | * |
||
| 594 | * @return DoctrineMembershipApplication |
||
| 595 | */ |
||
| 596 | public function setMembershipType( $membershipType ) { |
||
| 601 | |||
| 602 | /** |
||
| 603 | * @return string |
||
| 604 | */ |
||
| 605 | public function getMembershipType() { |
||
| 608 | |||
| 609 | /** |
||
| 610 | * @since 2.1 |
||
| 611 | * |
||
| 612 | * @param string $paymentType |
||
| 613 | * |
||
| 614 | * @return DoctrineMembershipApplication |
||
| 615 | */ |
||
| 616 | public function setPaymentType( $paymentType ) { |
||
| 621 | |||
| 622 | /** |
||
| 623 | * @since 2.1 |
||
| 624 | * |
||
| 625 | * @return string |
||
| 626 | */ |
||
| 627 | public function getPaymentType() { |
||
| 630 | |||
| 631 | /** |
||
| 632 | * @param integer $paymentAmountInEuro |
||
| 633 | * |
||
| 634 | * @return DoctrineMembershipApplication |
||
| 635 | */ |
||
| 636 | public function setPaymentAmount( $paymentAmountInEuro ) { |
||
| 641 | |||
| 642 | /** |
||
| 643 | * @return integer |
||
| 644 | */ |
||
| 645 | public function getPaymentAmount() { |
||
| 648 | |||
| 649 | /** |
||
| 650 | * @param integer $paymentIntervalInMonths |
||
| 651 | * |
||
| 652 | * @return DoctrineMembershipApplication |
||
| 653 | */ |
||
| 654 | public function setPaymentIntervalInMonths($paymentIntervalInMonths) { |
||
| 659 | |||
| 660 | /** |
||
| 661 | * @return integer |
||
| 662 | */ |
||
| 663 | public function getPaymentIntervalInMonths() { |
||
| 666 | |||
| 667 | |||
| 668 | /** |
||
| 669 | * @param string $paymentBankAccount |
||
| 670 | * |
||
| 671 | * @return DoctrineMembershipApplication |
||
| 672 | */ |
||
| 673 | public function setPaymentBankAccount( $paymentBankAccount ) { |
||
| 678 | |||
| 679 | /** |
||
| 680 | * @return string |
||
| 681 | */ |
||
| 682 | public function getPaymentBankAccount() { |
||
| 685 | |||
| 686 | /** |
||
| 687 | * @param string $paymentBankName |
||
| 688 | * |
||
| 689 | * @return DoctrineMembershipApplication |
||
| 690 | */ |
||
| 691 | public function setPaymentBankName( $paymentBankName ) { |
||
| 696 | |||
| 697 | /** |
||
| 698 | * @return string |
||
| 699 | */ |
||
| 700 | public function getPaymentBankName() { |
||
| 703 | |||
| 704 | /** |
||
| 705 | * @param string $paymentBankCode |
||
| 706 | * |
||
| 707 | * @return DoctrineMembershipApplication |
||
| 708 | */ |
||
| 709 | public function setPaymentBankCode( $paymentBankCode ) { |
||
| 714 | |||
| 715 | /** |
||
| 716 | * @return string |
||
| 717 | */ |
||
| 718 | public function getPaymentBankCode() { |
||
| 721 | |||
| 722 | /** |
||
| 723 | * @param string|null $paymentIban |
||
| 724 | * |
||
| 725 | * @return DoctrineMembershipApplication |
||
| 726 | */ |
||
| 727 | public function setPaymentIban( $paymentIban ) { |
||
| 732 | |||
| 733 | /** |
||
| 734 | * @return string|null |
||
| 735 | */ |
||
| 736 | public function getPaymentIban() { |
||
| 739 | |||
| 740 | /** |
||
| 741 | * @param string|null $paymentBic |
||
| 742 | * |
||
| 743 | * @return DoctrineMembershipApplication |
||
| 744 | */ |
||
| 745 | public function setPaymentBic( $paymentBic ) { |
||
| 750 | |||
| 751 | /** |
||
| 752 | * @return string|null |
||
| 753 | */ |
||
| 754 | public function getPaymentBic() { |
||
| 757 | |||
| 758 | /** |
||
| 759 | * @param string $paymentBankAccountHolder |
||
| 760 | * |
||
| 761 | * @return DoctrineMembershipApplication |
||
| 762 | */ |
||
| 763 | public function setPaymentBankAccountHolder( $paymentBankAccountHolder ) { |
||
| 768 | |||
| 769 | /** |
||
| 770 | * @return string |
||
| 771 | */ |
||
| 772 | public function getPaymentBankAccountHolder() { |
||
| 775 | |||
| 776 | /** |
||
| 777 | * @param string $comment |
||
| 778 | * |
||
| 779 | * @return DoctrineMembershipApplication |
||
| 780 | */ |
||
| 781 | public function setComment( $comment ) { |
||
| 786 | |||
| 787 | /** |
||
| 788 | * @return string |
||
| 789 | */ |
||
| 790 | public function getComment() { |
||
| 793 | |||
| 794 | /** |
||
| 795 | * Sets the time of export. |
||
| 796 | * |
||
| 797 | * @param \DateTime|null $export |
||
| 798 | * |
||
| 799 | * @return DoctrineMembershipApplication |
||
| 800 | */ |
||
| 801 | public function setExport( $export ) { |
||
| 806 | |||
| 807 | /** |
||
| 808 | * Returns the time of export. |
||
| 809 | * |
||
| 810 | * @return \DateTime|null |
||
| 811 | */ |
||
| 812 | public function getExport() { |
||
| 815 | |||
| 816 | /** |
||
| 817 | * Sets the time of backup. |
||
| 818 | * |
||
| 819 | * @param \DateTime|null $backup |
||
| 820 | * |
||
| 821 | * @return DoctrineMembershipApplication |
||
| 822 | */ |
||
| 823 | public function setBackup( $backup ) { |
||
| 828 | |||
| 829 | /** |
||
| 830 | * Returns the time of backup. |
||
| 831 | * |
||
| 832 | * @return \DateTime|null |
||
| 833 | */ |
||
| 834 | public function getBackup() { |
||
| 837 | |||
| 838 | /** |
||
| 839 | * @param boolean $wikilogin |
||
| 840 | * |
||
| 841 | * @return DoctrineMembershipApplication |
||
| 842 | */ |
||
| 843 | public function setWikilogin( $wikilogin ) { |
||
| 848 | |||
| 849 | /** |
||
| 850 | * @return boolean |
||
| 851 | */ |
||
| 852 | public function getWikilogin() { |
||
| 855 | |||
| 856 | /** |
||
| 857 | * @param string|null $tracking |
||
| 858 | * |
||
| 859 | * @return DoctrineMembershipApplication |
||
| 860 | */ |
||
| 861 | public function setTracking( $tracking ) { |
||
| 866 | |||
| 867 | /** |
||
| 868 | * @return string|null |
||
| 869 | */ |
||
| 870 | public function getTracking() { |
||
| 873 | |||
| 874 | /** |
||
| 875 | * Sets the status of the membership request. |
||
| 876 | * The allowed values are the STATUS_ constants in this class. |
||
| 877 | * |
||
| 878 | * @param integer $status |
||
| 879 | * |
||
| 880 | * @return DoctrineMembershipApplication |
||
| 881 | */ |
||
| 882 | public function setStatus( $status ) { |
||
| 887 | |||
| 888 | /** |
||
| 889 | * Returns the status of the membership request. |
||
| 890 | * The possible values are the STATUS_ constants in this class. |
||
| 891 | * |
||
| 892 | * @return integer |
||
| 893 | */ |
||
| 894 | public function getStatus() { |
||
| 897 | |||
| 898 | /** |
||
| 899 | * @param string|null $country |
||
| 900 | * |
||
| 901 | * @return DoctrineMembershipApplication |
||
| 902 | */ |
||
| 903 | public function setCountry( $country ) { |
||
| 908 | |||
| 909 | /** |
||
| 910 | * @return string|null |
||
| 911 | */ |
||
| 912 | public function getCountry() { |
||
| 915 | |||
| 916 | /** |
||
| 917 | * @param string|null $data |
||
| 918 | * |
||
| 919 | *@return DoctrineMembershipApplication |
||
| 920 | */ |
||
| 921 | public function setData( $data ) { |
||
| 926 | |||
| 927 | /** |
||
| 928 | * @return string|null |
||
| 929 | */ |
||
| 930 | public function getData() { |
||
| 933 | |||
| 934 | /** |
||
| 935 | * @return bool |
||
| 936 | */ |
||
| 937 | public function isUnconfirmed() { |
||
| 940 | |||
| 941 | /** |
||
| 942 | * @return bool |
||
| 943 | */ |
||
| 944 | public function needsModeration() { |
||
| 947 | |||
| 948 | /** |
||
| 949 | * @return bool |
||
| 950 | */ |
||
| 951 | public function isCancelled() { |
||
| 954 | |||
| 955 | public function log( $message ) { |
||
| 962 | |||
| 963 | /** |
||
| 964 | * NOTE: if possible, use @see getDataObject instead, as it provides a nicer API. |
||
| 965 | * |
||
| 966 | * @since 2.0 |
||
| 967 | * @return array |
||
| 968 | */ |
||
| 969 | public function getDecodedData() { |
||
| 974 | |||
| 975 | /** |
||
| 976 | * NOTE: if possible, use @see modifyDataObject instead, as it provides a nicer API. |
||
| 977 | * |
||
| 978 | * @since 2.0 |
||
| 979 | * @param array $data |
||
|
|
|||
| 980 | */ |
||
| 981 | public function encodeAndSetData( array $dataArray ) { |
||
| 984 | |||
| 985 | /** |
||
| 986 | * WARNING: updates made to the return value will not be reflected in the Donation state. |
||
| 987 | * Similarly, updates to the Donation state will not propagate to the returned object. |
||
| 988 | * To update the Donation state, explicitly call @see setDataObject. |
||
| 989 | * |
||
| 990 | * @since 2.0 |
||
| 991 | * @return MembershipApplicationData |
||
| 992 | */ |
||
| 993 | public function getDataObject() { |
||
| 1004 | |||
| 1005 | /** |
||
| 1006 | * @since 2.0 |
||
| 1007 | * @param MembershipApplicationData $data |
||
| 1008 | */ |
||
| 1009 | public function setDataObject( MembershipApplicationData $data ) { |
||
| 1027 | |||
| 1028 | /** |
||
| 1029 | * @since 2.0 |
||
| 1030 | * @param callable $modificationFunction Takes a modifiable MembershipApplicationData parameter |
||
| 1031 | */ |
||
| 1032 | public function modifyDataObject( callable $modificationFunction ) { |
||
| 1037 | |||
| 1038 | } |
||
| 1039 |
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.