INFRA-132 - CRM/Member - phpcbf
[civicrm-core.git] / CRM / Member / Form / MembershipRenewal.php
index fc6721f5f4d975e1d23989e1fc173004bb20ef7b..b54420d99ab76aafb9fc69b9cee78e7f21c4ea52 100644 (file)
@@ -41,31 +41,31 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form {
   /*
    * Display name of the member
    */
-  protected $_memberDisplayName = null;
+  protected $_memberDisplayName = NULL;
   /*
   * email of the person paying for the membership (used for receipts)
   */
-  protected $_memberEmail = null;
+  protected $_memberEmail = NULL;
   /*
   * Contact ID of the member
   */
-  public $_contactID = null;
+  public $_contactID = NULL;
   /*
   * Display name of the person paying for the membership (used for receipts)
   */
-  protected $_contributorDisplayName = null;
- /*
+  protected $_contributorDisplayName = NULL;
 /*
   * email of the person paying for the membership (used for receipts)
   */
-  protected $_contributorEmail = null;
+  protected $_contributorEmail = NULL;
   /*
   * email of the person paying for the membership (used for receipts)
   */
-  protected $_contributorContactID = null;
- /*
+  protected $_contributorContactID = NULL;
 /*
   * ID of the person the receipt is to go to
   */
-  protected $_receiptContactId = null;
+  protected $_receiptContactId = NULL;
   /*
    * context would be set to standalone if the contact is use is being selected from
    * the form rather than in the URL
@@ -187,7 +187,6 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form {
         'minimum_fee'
       ), NULL, '%a');
 
-
     $defaults['record_contribution'] = 0;
     $defaults['num_terms'] = 1;
     $defaults['send_receipt'] = 0;
@@ -300,9 +299,9 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form {
 
         if (!empty($values['auto_renew'])) {
           $allMembershipInfo[$key]['auto_renew'] = $options[$values['auto_renew']];
+        }
       }
     }
-    }
 
     $this->assign('allMembershipInfo', json_encode($allMembershipInfo));
 
@@ -446,8 +445,8 @@ WHERE   id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )';
       $this->addElement('checkbox', 'contribution_contact', ts('Record Payment from a Different Contact?'));
       $this->addSelect('soft_credit_type_id', array('entity' => 'contribution_soft'));
       $this->addEntityRef('soft_credit_contact_id', ts('Payment From'), array('create' => TRUE));
-  }
     }
+  }
 
   /**
    * Validation
@@ -507,7 +506,7 @@ WHERE   id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )';
       );
     }
 
-    $now = CRM_Utils_Date::getToday( null, 'YmdHis');
+    $now = CRM_Utils_Date::getToday( NULL, 'YmdHis');
     $this->convertDateFieldsToMySQL($formValues);
     $this->assign('receive_date', $formValues['receive_date']);
 
@@ -524,7 +523,7 @@ WHERE   id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )';
           $this->_memType, 'minimum_fee'
         ));
       if (empty($formValues['financial_type_id'])) {
-        $formValues['financial_type_id'] = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipType', $this->_memType,'financial_type_id');
+        $formValues['financial_type_id'] = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipType', $this->_memType, 'financial_type_id');
       }
 
       $this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($formValues['payment_processor_id'],
@@ -679,7 +678,7 @@ WHERE   id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )';
 
       //create line items
       $lineItem = array();
-      $priceSetId = null;
+      $priceSetId = NULL;
       CRM_Member_BAO_Membership::createLineItems($this, $formValues['membership_type_id'], $priceSetId);
       CRM_Price_BAO_PriceSet::processAmount($this->_priceSet['fields'],
         $this->_params, $lineItem[$priceSetId]
@@ -820,7 +819,7 @@ WHERE   id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )';
     $statusMsg = ts('%1 membership for %2 has been renewed.', array(1 => $memType, 2 => $this->_memberDisplayName));
 
     if ($endDate) {
-      $statusMsg .= ' ' . ts('The new membership End Date is %1.', array(1 => CRM_Utils_Date::customFormat(substr($endDate,0,8))));
+      $statusMsg .= ' ' . ts('The new membership End Date is %1.', array(1 => CRM_Utils_Date::customFormat(substr($endDate, 0, 8))));
     }
 
     if ($receiptSend && $mailSend) {