more comment tidy-ups, preliminary space + cap
authorEileen McNaughton <eileen@fuzion.co.nz>
Wed, 11 Feb 2015 21:42:01 +0000 (10:42 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Wed, 11 Feb 2015 21:42:29 +0000 (10:42 +1300)
CRM/Contribute/Form/Contribution.php

index 529cfc2db1d5263b9d1e2ccb9a9b9ce50147fe0f..0f57712c08408f56e879f0f54474973b7324eaf0 100644 (file)
@@ -85,7 +85,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
   public $_online = FALSE;
 
   /**
-   * Stores all product option
+   * Stores all product options.
    *
    * @var array
    */
@@ -227,8 +227,8 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
       CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
     }
 
-    //@todo - if anyone ever figures out what this _cdType subroutine is about (or even if it still applies) please
-    // add comments
+    // @todo - if anyone ever figures out what this _cdType subroutine is about
+    // (or even if it still applies) please add comments!!!!!!!!!!
     $this->_cdType = CRM_Utils_Array::value('type', $_GET);
     $this->assign('cdType', FALSE);
     if ($this->_cdType) {
@@ -289,7 +289,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     }
     $this->_values = array();
 
-    // current contribution id
+    // Current contribution id.
     if ($this->_id) {
       $this->assignPremiumProduct($this->_id);
       $this->buildValuesAndAssignOnline_Note_Type($this->_id, $this->_values);
@@ -334,12 +334,14 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
    */
   public function setDefaultValues() {
     if ($this->_cdType) {
+      // @todo document when this function would be called in this way
+      // (and whether it is valid or an overloading of this form).
       return CRM_Custom_Form_CustomData::setDefaultValues($this);
     }
 
     $defaults = $this->_values;
 
-    //set defaults for pledge payment.
+    // Set defaults for pledge payment.
     if ($this->_ppID) {
       $defaults['total_amount'] = CRM_Utils_Array::value('scheduled_amount', $this->_pledgeValues['pledgePayment']);
       $defaults['financial_type_id'] = CRM_Utils_Array::value('financial_type_id', $this->_pledgeValues);
@@ -351,12 +353,12 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
       return $defaults;
     }
 
-    // set soft credit defaults
+    // Set soft credit defaults.
     CRM_Contribute_Form_SoftCredit::setDefaultValues($defaults, $this);
 
     if ($this->_mode) {
       $config = CRM_Core_Config::singleton();
-      // set default country from config if no country set
+      // Set default country from config if no country set.
       if (empty($defaults["billing_country_id-{$this->_bltID}"])) {
         $defaults["billing_country_id-{$this->_bltID}"] = $config->defaultContactCountry;
       }
@@ -373,10 +375,10 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
       $this->_contactID = $defaults['contact_id'];
     }
 
-    // Set $newCredit variable in template to control whether link to credit card mode is included
+    // Set $newCredit variable in template to control whether link to credit card mode is included.
     $this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments());
 
-    // fix the display of the monetary value, CRM-4038
+    // Fix the display of the monetary value, CRM-4038.
     if (isset($defaults['total_amount'])) {
       if (!empty($defaults['tax_amount'])) {
         $componentDetails = CRM_Contribute_BAO_Contribution::getComponentDetails($this->_id);
@@ -414,7 +416,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     }
 
     $this->assign('showOption', TRUE);
-    // for Premium section
+    // For Premium section.
     if ($this->_premiumID) {
       $this->assign('showOption', FALSE);
       $options = isset($this->_options[$this->_productDAO->product_id]) ? $this->_options[$this->_productDAO->product_id] : "";
@@ -466,12 +468,12 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     ));
     $currency = CRM_Utils_Array::value('currency', $defaults);
     $this->assign('currency', $currency);
-    // Hack to get currency info to the js layer. CRM-11440
+    // Hack to get currency info to the js layer. CRM-11440.
     CRM_Utils_Money::format(1);
     $this->assign('currencySymbol', CRM_Utils_Array::value($currency, CRM_Utils_Money::$_currencySymbols));
     $this->assign('totalAmount', CRM_Utils_Array::value('total_amount', $defaults));
 
-    //inherit campaign from pledge.
+    // Inherit campaign from pledge.
     if ($this->_ppID && !empty($this->_pledgeValues['campaign_id'])) {
       $defaults['campaign_id'] = $this->_pledgeValues['campaign_id'];
     }