phpcs fixes
authorEileen McNaughton <eileen@fuzion.co.nz>
Sun, 12 Jul 2015 07:31:02 +0000 (19:31 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Sun, 12 Jul 2015 07:31:02 +0000 (19:31 +1200)
CRM/Contribute/Form/Contribution/Main.php
CRM/Core/Payment.php
CRM/Core/Payment/Form.php
CRM/Core/Payment/PayPalImpl.php

index 8bed98d4dc3fd47d677a3049f91873497beec5ee..86c2367b146f93f4a98b3704b74a9473e527f0fb 100644 (file)
@@ -1306,9 +1306,9 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
       if ($this->_paymentProcessor &&
         $this->_paymentProcessor['object']->supportsPreApproval()
       ) {
-         $this->handlePreApproval($params);
-        }
+        $this->handlePreApproval($params);
       }
+    }
 
     if (empty($this->_values['is_confirm_enabled'])) {
       $this->skipToThankYouPage();
index 7a753b296d12d1385b3a4bae96bfee0b34083032..b5176bf850a3c75cc52e92ce7d0617af95dc5868 100644 (file)
@@ -242,8 +242,6 @@ abstract class CRM_Core_Payment {
    *
    * @param array $params
    *   Parameters from the form
-   * @param string component
-   *  contribution or event.
    *
    * This function returns an array which should contain
    *   - pre_approval_parameters (this will be stored on the calling form & available later)
@@ -702,7 +700,7 @@ abstract class CRM_Core_Payment {
       }
     }
     else {
-      if ($this->_paymentProcessor['billing_mode'] ==1) {
+      if ($this->_paymentProcessor['billing_mode'] == 1) {
         $result = $this->doDirectPayment($params, $component);
       }
       else {
index ee2980b03ab5faae0f289d963372fe232fbb608e..addc8287b1a9e478586e34d08e429689a2d24c1a 100644 (file)
@@ -321,7 +321,6 @@ class CRM_Core_Payment_Form {
   }
 
   /**
->>>>>>> 65e3e1ce2d1e407fa768966606173c79b12ba81f
    * Validate the payment instrument values before passing it to the payment processor
    * We want this to be overrideable by the payment processor, and default to using
    * this object's validCreditCard for credit cards (implemented as the default in the Payment class).
@@ -329,7 +328,7 @@ class CRM_Core_Payment_Form {
   public static function validatePaymentInstrument($payment_processor_id, $values, &$errors, $form) {
     // ignore if we don't have a payment instrument to validate (e.g. backend payments)
     if ($payment_processor_id > 0) {
-      $payment =  Civi\Payment\System::singleton()->getById($payment_processor_id);
+      $payment = Civi\Payment\System::singleton()->getById($payment_processor_id);
       $payment->validatePaymentInstrument($values, $errors);
     }
   }
index 600ec5c544c896c0aff645728b61a5b2453870ca..d0f66b54af0cdf5c151aae9334ce70629f988f68 100644 (file)
@@ -630,16 +630,16 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     return FALSE;
   }
 
- /**
- * Function to action pre-approval if supported
- *
- * @param array $params
- *   Parameters from the form
- *
- * @return array
- *   - pre_approval_parameters (this will be stored on the calling form & available later)
- *   - redirect_url (if set the browser will be redirected to this.
- */
 /**
  * Function to action pre-approval if supported
  *
  * @param array $params
  *   Parameters from the form
  *
  * @return array
  *   - pre_approval_parameters (this will be stored on the calling form & available later)
  *   - redirect_url (if set the browser will be redirected to this.
  */
   public function doPreApproval(&$params) {
     $token = $this->setExpressCheckOut($params);
     return array(