X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FBAO%2FParticipantPayment.php;h=511e96b7484d96d4029e3c9a82df1fcb82255784;hb=8a938c69396c9e4b5d5703d37ddef7afbdcfcfbd;hp=101448314977aa04618af718ae62b740236bd5c8;hpb=353ffa53c335f7b94ebaddc701e46f2bb30c7048;p=civicrm-core.git diff --git a/CRM/Event/BAO/ParticipantPayment.php b/CRM/Event/BAO/ParticipantPayment.php index 1014483149..511e96b748 100644 --- a/CRM/Event/BAO/ParticipantPayment.php +++ b/CRM/Event/BAO/ParticipantPayment.php @@ -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. | | | @@ -23,20 +23,20 @@ | 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$ * */ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment { /** - * Creates or updates a participant payment record + * Creates or updates a participant payment record. * * @param array $params * of values to initialize the record with. @@ -45,7 +45,6 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment * * @return object * the partcipant payment record - * @static */ public static function create(&$params, &$ids) { if (isset($ids['id'])) { @@ -77,8 +76,8 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment $lineItemCount = CRM_Core_DAO::singleValueQuery("select count(*) FROM civicrm_line_item WHERE contribution_id = %1", array( 1 => array( $participantPayment->contribution_id, - 'Integer' - ) + 'Integer', + ), )); if ($lineItemCount == 1) { $sql = "UPDATE civicrm_line_item li @@ -86,7 +85,7 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment 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') + 2 => array($participantPayment->contribution_id, 'Integer'), )); } @@ -94,15 +93,14 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment } /** - * Delete the record that are associated with this ParticipantPayment + * Delete the record that are associated with this ParticipantPayment. * Also deletes the associated contribution for this participant * * @param array $params * Associative array whose values match the record to be deleted. * - * @return boolean + * @return bool * true if deleted false otherwise - * @static */ public static function deleteParticipantPayment($params) { $participantPayment = new CRM_Event_DAO_ParticipantPayment(); @@ -128,4 +126,5 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment } return FALSE; } + }