Merge branch 4.5 into 4.6
[civicrm-core.git] / CRM / Price / Form / Field.php
index e4c82e6cac7cc4d465168a84773b0351119019e5..93352c624d891d9224dd9b6b7a13ff3e767af210 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -44,7 +44,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
   const NUM_OPTION = 15;
 
   /**
-   * The custom set id saved to the session for an update
+   * The custom set id saved to the session for an update.
    *
    * @var int
    */
@@ -58,23 +58,19 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
   protected $_fid;
 
   /**
-   * The extended component Id
+   * The extended component Id.
    *
    * @var array
    */
   protected $_extendComponentId;
 
   /**
-   * Variable is set if price set is used for membership
+   * Variable is set if price set is used for membership.
    */
   protected $_useForMember;
 
   /**
-   * Set variables up before form is built
-   *
-   * @param null
-   *
-   * @return void
+   * Set variables up before form is built.
    */
   public function preProcess() {
 
@@ -98,8 +94,6 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
    * Set default values for the form. Note that in edit/view mode
    * the default values are retrieved from the database
    *
-   * @param null
-   *
    * @return array
    *   array of default values
    */
@@ -165,11 +159,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
   }
 
   /**
-   * Build the form object
-   *
-   * @param null
-   *
-   * @return void
+   * Build the form object.
    */
   public function buildQuickForm() {
     // lets trim all the whitespace
@@ -291,9 +281,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
         $js = array('onchange' => "calculateRowValues( $i );");
 
         $this->add('select', 'membership_type_id[' . $i . ']', ts('Membership Type'),
-          array(
-            '' => ' '
-          ) + $membershipTypes, FALSE, $js
+          array('' => ' ') + $membershipTypes, FALSE, $js
         );
         $this->add('text', 'membership_num_terms[' . $i . ']', ts('Number of Terms'), CRM_Utils_Array::value('membership_num_terms', $attributes));
       }
@@ -384,7 +372,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
   }
 
   /**
-   * Global validation rules for the form
+   * Global validation rules for the form.
    *
    * @param array $fields
    *   Posted values of the form.
@@ -603,11 +591,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
   }
 
   /**
-   * Process the form
-   *
-   * @param null
-   *
-   * @return void
+   * Process the form.
    */
   public function postProcess() {
     // store the submitted values in an array
@@ -687,4 +671,5 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
       $session->replaceUserContext(CRM_Utils_System::url('civicrm/admin/price/field', 'reset=1&action=browse&sid=' . $this->_sid));
     }
   }
+
 }