From: Eileen McNaughton Date: Tue, 13 Jan 2015 00:52:23 +0000 (+1300) Subject: minor variable & doc fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=906e61201330745db966892cb4de0764516ab992;p=civicrm-core.git minor variable & doc fixes --- diff --git a/CRM/Core/BAO/Address.php b/CRM/Core/BAO/Address.php index db83737a2d..7a0d028221 100644 --- a/CRM/Core/BAO/Address.php +++ b/CRM/Core/BAO/Address.php @@ -141,8 +141,7 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address { * True if you need to fix (format) address values. * before inserting in db * - * @return object - * CRM_Core_BAO_Address object on success, null otherwise + * @return CRM_Core_BAO_Address|null */ public static function add(&$params, $fixAddress) { static $customFields = NULL; diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index e4c4d4911c..f9ce69dccc 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -235,7 +235,7 @@ class CRM_Member_BAO_Membership extends CRM_Member_DAO_Membership { * * @throws CRM_Core_Exception * - * @return CRM_Member_BAO_Membership + * @return CRM_Member_BAO_Membership|CRM_Core_Error */ public static function create(&$params, &$ids, $skipRedirect = FALSE, $activityType = 'Membership Signup') { // always calculate status if is_override/skipStatusCal is not true. diff --git a/CRM/Pledge/BAO/PledgePayment.php b/CRM/Pledge/BAO/PledgePayment.php index 268a04f80b..7deb2ac27b 100644 --- a/CRM/Pledge/BAO/PledgePayment.php +++ b/CRM/Pledge/BAO/PledgePayment.php @@ -167,7 +167,7 @@ WHERE pledge_id = %1 * @param array $params * Associate array of field. * - * @return int + * @return CRM_Pledge_DAO_PledgePayment * pledge payment id */ public static function add($params) { @@ -183,8 +183,7 @@ WHERE pledge_id = %1 // set currency for CRM-1496 if (!isset($payment->currency)) { - $config = CRM_Core_Config::singleton(); - $payment->currency = $config->defaultCurrency; + $payment->currency = CRM_Core_Config::singleton()->defaultCurrency; } $result = $payment->save(); diff --git a/api/v3/Attachment.php b/api/v3/Attachment.php index 85e6cbb167..7640f1fc39 100644 --- a/api/v3/Attachment.php +++ b/api/v3/Attachment.php @@ -240,7 +240,7 @@ function civicrm_api3_attachment_delete($params) { * @param array $file * The user-supplied vales for the file (mime_type, description, upload_date). * @param array $entityFile - * The user-supllied values of the entity-file (entity_table, entity_id). + * The user-supplied values of the entity-file (entity_table, entity_id). * @param bool $isTrusted * @return CRM_Core_DAO * @throws API_Exception diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 3963b92770..7bc6be0ae6 100755 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -114,12 +114,11 @@ function _civicrm_api3_mailing_create_spec(&$params) { * Handle a delete event. * * @param array $params - * @param array $ids * * @return array * API Success Array */ -function civicrm_api3_mailing_delete($params, $ids = array()) { +function civicrm_api3_mailing_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); } diff --git a/api/v3/PledgePayment.php b/api/v3/PledgePayment.php index 1f62cd98cf..73c41662ee 100644 --- a/api/v3/PledgePayment.php +++ b/api/v3/PledgePayment.php @@ -66,6 +66,7 @@ function civicrm_api3_pledge_payment_create($params) { } $dao = CRM_Pledge_BAO_PledgePayment::add($paymentParams); + $result = array(); if (empty($dao->pledge_id)) { $dao->find(TRUE); }