Merge pull request #5278 from kurund/CRM-15756
[civicrm-core.git] / CRM / Contribute / BAO / ContributionSoft.php
index f4a9ec69c32d8501f919195259f6f6b9d0d93687..a5eaeb3cac2b445b14e9e391fbef49cb8a945875 100644 (file)
 class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_ContributionSoft {
 
   /**
-   * Construct method
+   * Construct method.
    */
   public function __construct() {
     parent::__construct();
   }
 
   /**
-   * Add contribution soft credit record
+   * Add contribution soft credit record.
    *
    * @param array $params
    *   (reference ) an assoc array of name/value pairs.
    *
-   * @return object soft contribution of object that is added
-   *
+   * @return object
+   *   soft contribution of object that is added
    */
   public static function add(&$params) {
     $contributionSoft = new CRM_Contribute_DAO_ContributionSoft();
@@ -63,15 +63,14 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
   }
 
   /**
-   * Fetch object based on array of properties
+   * Fetch object based on array of properties.
    *
    * @param array $params
    *   (reference ) an assoc array of name/value pairs.
    * @param array $defaults
    *   (reference ) an assoc array to hold the flattened values.
    *
-   * @return CRM_Contribute_BAO_ContributionSoft object
-   * @static
+   * @return CRM_Contribute_BAO_ContributionSoft
    */
   public static function retrieve(&$params, &$defaults) {
     $contributionSoft = new CRM_Contribute_DAO_ContributionSoft();
@@ -84,11 +83,10 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
   }
 
   /**
-   * Delete soft credits
+   * Delete soft credits.
    *
    * @param array $params
    *
-   * @static
    */
   public static function del($params) {
     //delete from contribution soft table
@@ -114,8 +112,9 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
     GROUP BY currency';
 
     $params = array(
-    1 => array($contact_id, 'Integer'),
-      2 => array($isTest, 'Integer'));
+      1 => array($contact_id, 'Integer'),
+      2 => array($isTest, 'Integer'),
+    );
 
     $cs = CRM_Core_DAO::executeQuery($query, $params);
 
@@ -148,8 +147,8 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
    * @param bool $all
    *   Include PCP data.
    *
-   * @return array of soft contribution ids, amounts, and associated contact ids
-   * @static
+   * @return array
+   *   Array of soft contribution ids, amounts, and associated contact ids
    */
   public static function getSoftContribution($contributionID, $all = FALSE) {
     $pcpFields = array(
@@ -238,12 +237,11 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
    *
    * @param int $contact_id
    *   Contact id.
-   * @param int $isTest
    * @param string $filter
+   * @param int $isTest
    *   Additional filter criteria, later used in where clause.
    *
    * @return array
-   * @static
    */
   public static function getSoftContributionList($contact_id, $filter = NULL, $isTest = 0) {
     $query = '
@@ -309,15 +307,11 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
     return $result;
   }
 
-  /*
-   *  Function to assign honor profile fields to template/form, if $honorId (as soft-credit's contact_id)
-   *  is passed  then  whole honoreeprofile fields with title/value assoc array assigned or only honoreeName
-   *  is assigned
-   *
-   *  @static
-   */
-
   /**
+   * Function to assign honor profile fields to template/form, if $honorId (as soft-credit's contact_id)
+   * is passed  then  whole honoreeprofile fields with title/value assoc array assigned or only honoreeName
+   * is assigned
+   *
    * @param CRM_Core_Form $form
    * @param array $params
    * @param int $honoreeprofileId
@@ -383,4 +377,5 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
       $form->assign('honorName', $honorName);
     }
   }
+
 }