INFRA-132 - Misc
[civicrm-core.git] / api / v3 / ParticipantPayment.php
index f2d3dccfd76f1f029de06a4b093229b21f2ddf36..be5ff03ba830885cbd78fcfaa1544eff315210c8 100644 (file)
@@ -1,10 +1,9 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  * @package CiviCRM_APIv3
  * @subpackage API_Participant
  *
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * @version $Id: Participant.php 30486 2010-11-02 16:12:09Z shot $
  *
  */
 
-/**
- * Files required for this package
- */
-
 /**
  * Create a Event Participant Payment
  *
  * This API is used for creating a Participant Payment of Event.
  * Required parameters : participant_id, contribution_id.
  *
- * @param   array  $params     an associative array of name/value property values of civicrm_participant_payment
+ * @param array $params
+ *   An associative array of name/value property values of civicrm_participant_payment.
  * @example ParticipantPaymentCreate.php
  * {@example ParticipantPaymentCreate.php 0}
  *
- * @return array of newly created payment property values.
+ * @return array
+ *   Array of newly created payment property values.
  * {@getfields ParticipantPayment_create}
- * @access public
  */
 function civicrm_api3_participant_payment_create($params) {
 
   $ids = array();
-  if (CRM_Utils_Array::value('id', $params)) {
+  if (!empty($params['id'])) {
     $ids['id'] = $params['id'];
   }
   $participantPayment = CRM_Event_BAO_ParticipantPayment::create($params, $ids);
@@ -73,7 +69,8 @@ function civicrm_api3_participant_payment_create($params) {
  * Adjust Metadata for Create action
  *
  * The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ *   Array or parameters determined by getfields.
  */
 function _civicrm_api3_participant_payment_create_spec(&$params) {
   $params['participant_id']['api.required'] = 1;
@@ -85,12 +82,12 @@ function _civicrm_api3_participant_payment_create_spec(&$params) {
  *
  * This API is used for deleting a Participant Payment
  *
- * @param  Int  $participantPaymentID   Id of the Participant Payment to be deleted
+ * @param array $params
  *
- * @return array API result
+ * @return array
+ *   API result
  * @example ParticipantPaymentDelete.php
  * {@getfields ParticipantPayment_delete}
- * @access public
  */
 function civicrm_api3_participant_payment_delete($params) {
   $participant = new CRM_Event_BAO_ParticipantPayment();
@@ -99,16 +96,16 @@ function civicrm_api3_participant_payment_delete($params) {
 
 /**
  * Retrieve one / all contribution(s) / participant(s) linked to a
- * contrbution.
+ * contribution.
  *
- * @param  array   $params  input parameters
+ * @param array $params
+ *   Input parameters.
  *
- * @return array  array of properties, if error an array with an error id and error message
- *  @example ParticipantPaymentGet
+ * @return array
+ *   array of properties, if error an array with an error id and error message
+ * @example ParticipantPaymentGet
  * {@getfields ParticipantPayment_get}
- * @access public
  */
 function civicrm_api3_participant_payment_get($params) {
   return _civicrm_api3_basic_get('CRM_Event_DAO_ParticipantPayment', $params);
 }
-