Merge pull request #5971 from PalanteJon/activityreportfix
[civicrm-core.git] / CRM / Core / Payment / ProcessorForm.php
index bb2d546c8ac3707b547a49cc347fb32177a789cc..9e9f33660f5e45d13f62a4747afb7a8165b02039 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -45,7 +45,7 @@ class CRM_Core_Payment_ProcessorForm {
    *
    * @throws Exception
    */
-  public static function preProcess(&$form, $type = NULL, $mode = NULL ) {
+  public static function preProcess(&$form, $type = NULL, $mode = NULL) {
     if ($type) {
       $form->_type = $type;
     }
@@ -61,7 +61,7 @@ class CRM_Core_Payment_ProcessorForm {
 
     // also set cancel subscription url
     if (!empty($form->_paymentProcessor['is_recur']) && !empty($form->_values['is_recur'])) {
-      $form->_paymentObject = &CRM_Core_Payment::singleton($mode, $form->_paymentProcessor, $form);
+      $form->_paymentObject = CRM_Core_Payment::singleton($mode, $form->_paymentProcessor, $form);
       $form->_values['cancelSubscriptionUrl'] = $form->_paymentObject->subscriptionURL();
     }
 
@@ -70,7 +70,6 @@ class CRM_Core_Payment_ProcessorForm {
     // saving the country/state list in the session (which could be huge)
     CRM_Core_Payment_Form::setPaymentFieldsByProcessor($form, $form->_paymentProcessor);
 
-
     $form->assign_by_ref('paymentProcessor', $form->_paymentProcessor);
 
     // check if this is a paypal auto return and redirect accordingly
@@ -84,7 +83,8 @@ class CRM_Core_Payment_ProcessorForm {
 
     // make sure we have a valid payment class, else abort
     if (!empty($form->_values['is_monetary']) &&
-      !$form->_paymentProcessor['class_name'] && empty($form->_values['is_pay_later'])) {
+      !$form->_paymentProcessor['class_name'] && empty($form->_values['is_pay_later'])
+    ) {
       CRM_Core_Error::fatal(ts('Payment processor is not set for this page'));
     }
 
@@ -113,4 +113,5 @@ class CRM_Core_Payment_ProcessorForm {
     }
     CRM_Core_Payment_Form::buildPaymentForm($form, $form->_paymentProcessor, empty($form->_isBillingAddressRequiredForPayLater));
   }
+
 }