INFRA-132 - Comment grammar cleanup
[civicrm-core.git] / CRM / Member / Form.php
index 6233cf049dd7d01a0bc9d2ef64f74e4b8c554313..8918b2d30e1c54130a682fbdc28918c4035cb49b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -58,8 +58,8 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
    */
   protected $_fromEmails = array();
 
-  function preProcess() {
-    $this->_action = CRM_Utils_Request::retrieve('action', 'String',$this, FALSE, 'add');
+  public function preProcess() {
+    $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'add');
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'membership');
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     $this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
@@ -81,14 +81,13 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
   }
 
   /**
-   * This function sets the default values for the form. MobileProvider that in edit/view mode
+   * Set default values for the form. MobileProvider that in edit/view mode
    * the default values are retrieved from the database
    *
-   * @access public
    *
    * @return array defaults
    */
-  function setDefaultValues() {
+  public function setDefaultValues() {
     $defaults = array();
     if (isset($this->_id)) {
       $params = array('id' => $this->_id);
@@ -118,10 +117,9 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
   }
 
   /**
-   * Function to actually build the form
+   * Build the form object
    *
    * @return void
-   * @access public
    */
   public function buildQuickForm() {
     if ($this->_mode) {
@@ -137,12 +135,12 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
           array(
             'type' => 'upload',
             'name' => ts('Renew'),
-            'isDefault' => TRUE
+            'isDefault' => TRUE,
           ),
           array(
             'type' => 'cancel',
-            'name' => ts('Cancel')
-          )
+            'name' => ts('Cancel'),
+          ),
         )
       );
     }
@@ -151,12 +149,12 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
           array(
             'type' => 'next',
             'name' => ts('Delete'),
-            'isDefault' => TRUE
+            'isDefault' => TRUE,
           ),
           array(
             'type' => 'cancel',
-            'name' => ts('Cancel')
-          )
+            'name' => ts('Cancel'),
+          ),
         )
       );
     }
@@ -165,24 +163,24 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
           array(
             'type' => 'upload',
             'name' => ts('Save'),
-            'isDefault' => TRUE
+            'isDefault' => TRUE,
           ),
           array(
             'type' => 'upload',
             'name' => ts('Save and New'),
-            'subName' => 'new'
+            'subName' => 'new',
           ),
           array(
             'type' => 'cancel',
-            'name' => ts('Cancel')
-          )
+            'name' => ts('Cancel'),
+          ),
         )
       );
     }
   }
 
   /**
-   * Function to extract values from the contact create boxes on the form and assign appropriately  to
+   * Extract values from the contact create boxes on the form and assign appropriately  to
    *
    *  - $this->_contributorEmail,
    *  - $this->_memberEmail &
@@ -195,11 +193,12 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
    * If the member & contributor are the same then the values will be the same. But if different people paid
    * then they weill differ
    *
-   * @param $formValues array values from form. The important values we are looking for are
+   * @param array $formValues
+   *   values from form. The important values we are looking for are.
    *  - contact_id
    *  - soft_credit_contact_id
    */
-  function storeContactFields($formValues){
+  public function storeContactFields($formValues) {
     // in a 'standalone form' (contact id not in the url) the contact will be in the form values
     if (!empty($formValues['contact_id'])) {
       $this->_contactID = $formValues['contact_id'];
@@ -213,8 +212,8 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
     // here we store details in order to do that
     if (!empty($formValues['soft_credit_contact_id'])) {
       $this->_receiptContactId = $this->_contributorContactID = $formValues['soft_credit_contact_id'];
-       list( $this->_contributorDisplayName,
-         $this->_contributorEmail ) = CRM_Contact_BAO_Contact_Location::getEmailDetails( $this->_contributorContactID );
+      list($this->_contributorDisplayName,
+         $this->_contributorEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($this->_contributorContactID);
     }
     else {
       $this->_receiptContactId = $this->_contributorContactID = $this->_contactID;
@@ -223,4 +222,3 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
     }
   }
 }
-