minor variable & doc fixes
authorEileen McNaughton <eileen@fuzion.co.nz>
Tue, 13 Jan 2015 00:52:23 +0000 (13:52 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Tue, 13 Jan 2015 00:52:23 +0000 (13:52 +1300)
CRM/Core/BAO/Address.php
CRM/Member/BAO/Membership.php
CRM/Pledge/BAO/PledgePayment.php
api/v3/Attachment.php
api/v3/Mailing.php
api/v3/PledgePayment.php

index db83737a2d76b609f4622d307315e9ef9fed7ca4..7a0d028221cd993626690bc1a3a3b84e848eda14 100644 (file)
@@ -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;
index e4c4d4911c9ab5cc0d661b76706fb620b7264850..f9ce69dccca59aea7af4e246f3c7d124570ba7ec 100644 (file)
@@ -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.
index 268a04f80b2a2cd8b5fa197e91d24750b8442eea..7deb2ac27bf9fc5423d3933e749ce1def2bf525d 100644 (file)
@@ -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();
index 85e6cbb1676ec930b0dd1a63dbe0b6183fa9f397..7640f1fc398bb718a253b322af7b996c19d04ffb 100644 (file)
@@ -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
index 3963b92770d72d946e6e093e4a3033fc14db6692..7bc6be0ae629fa72e0174fde468fdc7f5977d55d 100755 (executable)
@@ -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);
 }
 
index 1f62cd98cfe3a5b4f84b82b7fb613a520d4a98c2..73c41662ee31367a666665168c6daaa142afc8bf 100644 (file)
@@ -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);
   }