Revert "PropertyBag - add cardNumber to getters"
authoreileen <emcnaughton@wikimedia.org>
Fri, 12 Jun 2020 22:50:44 +0000 (10:50 +1200)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 10 Sep 2020 10:36:37 +0000 (20:36 +1000)
This reverts commit 194ae0f4206d0de00dea44553ac8a679cd771ea4.

Civi/Payment/PropertyBag.php

index 7b11524e9892d34184808cb15d6f1bc8b2acebda..49a4ea4e8c9975f9c5392638c098b2033a7dc78a 100644 (file)
@@ -34,14 +34,12 @@ class PropertyBag implements \ArrayAccess {
     'billingPostalCode'           => TRUE,
     'billingCounty'               => TRUE,
     'billingCountry'              => TRUE,
-    'cardNumber'                  => TRUE,
     'contactID'                   => TRUE,
     'contact_id'                  => 'contactID',
     'contributionID'              => TRUE,
     'contribution_id'             => 'contributionID',
     'contributionRecurID'         => TRUE,
     'contribution_recur_id'       => 'contributionRecurID',
-    'credit_card_number'          => 'cardNumber',
     'currency'                    => TRUE,
     'currencyID'                  => 'currency',
     'description'                 => TRUE,
@@ -594,29 +592,6 @@ class PropertyBag implements \ArrayAccess {
   }
 
   /**
-   * Get the (generally credit) card number.
-   *
-   * @param string $label
-   *
-   * @return string
-   */
-  public function getCardNumber($label = 'default'): string {
-    return $this->get('cardNumber', $label);
-  }
-
-  /**
-   * @param string $cardNumber
-   * @param string $label
-   *
-   * @return \Civi\Payment\PropertyBag
-   */
-  public function setCardNumber($cardNumber, $label = 'default'): PropertyBag {
-    return $this->set('cardNumber', $label, (string) $cardNumber);
-  }
-
-  /**
-   * @param string $label
-   *
    * @return int
    */
   public function getContactID($label = 'default'): int {
@@ -626,8 +601,6 @@ class PropertyBag implements \ArrayAccess {
   /**
    * @param int $contactID
    * @param string $label
-   *
-   * @return \Civi\Payment\PropertyBag
    */
   public function setContactID($contactID, $label = 'default') {
     // We don't use this because it counts zero as positive: CRM_Utils_Type::validate($contactID, 'Positive');