fix some spelling:
[civicrm-core.git] / CRM / Event / BAO / ParticipantPayment.php
index 6a203bf90898cfd024e9a1ed82fdc48dd67848ae..101448314977aa04618af718ae62b740236bd5c8 100644 (file)
@@ -74,12 +74,20 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment
 
     //generally if people are creating participant_payments via the api they won't be setting the line item correctly - we can't help them if they are doing complex transactions
     // but if they have a single line item for the contribution we can assume it should refer to the participant line
-    $lineItemCount = CRM_Core_DAO::singleValueQuery("select count(*) FROM civicrm_line_item WHERE contribution_id = %1", array(1 => array($participantPayment->contribution_id, 'Integer')));
+    $lineItemCount = CRM_Core_DAO::singleValueQuery("select count(*) FROM civicrm_line_item WHERE contribution_id = %1", array(
+        1 => array(
+          $participantPayment->contribution_id,
+          'Integer'
+        )
+      ));
     if ($lineItemCount == 1) {
       $sql = "UPDATE civicrm_line_item li
       SET entity_table = 'civicrm_participant', entity_id = %1
       WHERE contribution_id = %2 AND entity_table = 'civicrm_contribution'";
-      CRM_Core_DAO::executeQuery($sql, array(1 => array($participantPayment->participant_id, 'Integer'), 2 => array($participantPayment->contribution_id, 'Integer')));
+      CRM_Core_DAO::executeQuery($sql, array(
+          1 => array($participantPayment->participant_id, 'Integer'),
+          2 => array($participantPayment->contribution_id, 'Integer')
+        ));
     }
 
     return $participantPayment;