Merge pull request #4893 from colemanw/INFRA-132
[civicrm-core.git] / CRM / Financial / BAO / PaymentProcessor.php
index 3797908d43d3760708169e92844536dc0687ff43..d32fde8ffab3704a78bbb437905236d274624d29 100644 (file)
@@ -36,8 +36,7 @@
 /**
  * This class contains payment processor related functions.
  */
-class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProcessor
-{
+class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProcessor {
   /**
    * Static holder for the default payment processor
    */
@@ -78,7 +77,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
         'entity_table' => 'civicrm_payment_processor',
         'entity_id' => $processor->id,
         'account_relationship' => $relationTypeId,
-        'financial_account_id' => $params['financial_account_id']
+        'financial_account_id' => $params['financial_account_id'],
       );
       CRM_Financial_BAO_FinancialTypeAccount::add($values);
     }
@@ -123,7 +122,8 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @param bool $is_active
    *   Value we want to set the is_active field.
    *
-   * @return Object             DAO object on sucess, null otherwise
+   * @return Object
+   *   DAO object on sucess, null otherwise
    *
    * @static
    */
@@ -136,7 +136,8 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    *
    * @param NULL
    *
-   * @return object           The default payment processor object on success,
+   * @return object
+   *   The default payment processor object on success,
    *                          null otherwise
    * @static
    */
@@ -184,7 +185,8 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @param string $mode
    *   Payment mode ie test or live.
    *
-   * @return array  associated array with payment processor related fields
+   * @return array
+   *   associated array with payment processor related fields
    * @static
    */
   public static function getPayment($paymentProcessorID, $mode) {
@@ -192,7 +194,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
       CRM_Core_Error::fatal(ts('Invalid value passed to getPayment function'));
     }
 
-    $dao            = new CRM_Financial_DAO_PaymentProcessor( );
+    $dao            = new CRM_Financial_DAO_PaymentProcessor();
     $dao->id        = $paymentProcessorID;
     $dao->is_active = 1;
     if (!$dao->find(TRUE)) {
@@ -200,7 +202,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
     }
 
     if ($mode == 'test') {
-      $testDAO = new CRM_Financial_DAO_PaymentProcessor( );
+      $testDAO = new CRM_Financial_DAO_PaymentProcessor();
       $testDAO->name      = $dao->name;
       $testDAO->is_active = 1;
       $testDAO->is_test   = 1;
@@ -243,7 +245,7 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @param array_type $processor2
    * @return number
    */
-  public static function defaultComparison($processor1, $processor2){
+  public static function defaultComparison($processor1, $processor2) {
     $p1 = CRM_Utils_Array::value('is_default', $processor1);
     $p2 = CRM_Utils_Array::value('is_default', $processor2);
     if ($p1 == $p2) {
@@ -260,7 +262,8 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @param string $mode
    *   Payment mode ie test or live.
    *
-   * @return array  associated array with payment processor related fields
+   * @return array
+   *   associated array with payment processor related fields
    * @static
    */
   public static function buildPayment($dao, $mode) {
@@ -342,7 +345,8 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    *
    * @param array $ids
    *
-   * @return array available processors
+   * @return array
+   *   available processors
    */
   public static function getPaymentProcessors($capabilities = array(), $ids = array()) {
     $mode = NULL;
@@ -396,7 +400,8 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
    * @param string $type
    *   Type of payment information to be retrieved.
    *
-   * @return int / array / object based on type
+   * @return int
+   *   / array / object based on type
    * @static
    */
   public static function getProcessorForEntity($entityID, $component = 'contribute', $type = 'id') {