Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-02-25-11-27-40
[civicrm-core.git] / CRM / Financial / BAO / FinancialType.php
index 72a1216b8fd731d9c15985a65bf2fa8fa09cc674..df8b7c0027010c9313b34fa201ff2ab8dd22929f 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
   +--------------------------------------------------------------------+
   | CiviCRM version 4.6                                                |
@@ -24,7 +23,7 @@
   | GNU Affero General Public License or the licensing of CiviCRM,     |
   | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
   +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * $Id$
  *
  */
-
 class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
 
   /**
-   * Static holder for the default LT
+   * Static holder for the default LT.
    */
   static $_defaultContributionType = NULL;
 
   /**
-   * Class constructor
+   * Class constructor.
    */
   public function __construct() {
     parent::__construct();
   }
 
   /**
-   * 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_ContributionType object
-   * @static
+   * @return CRM_Contribute_BAO_ContributionType
    */
   public static function retrieve(&$params, &$defaults) {
     $financialType = new CRM_Financial_DAO_FinancialType();
@@ -70,29 +67,28 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
   }
 
   /**
-   * Update the is_active flag in the db
+   * Update the is_active flag in the db.
    *
    * @param int $id
    *   Id of the database record.
    * @param bool $is_active
    *   Value we want to set the is_active field.
    *
-   * @return Object             DAO object on sucess, null otherwise
-   * @static
+   * @return Object
+   *   DAO object on sucess, null otherwise
    */
   public static function setIsActive($id, $is_active) {
     return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialType', $id, 'is_active', $is_active);
   }
 
   /**
-   * Add the financial types
+   * Add the financial types.
    *
    * @param array $params
    *   Reference array contains the values submitted by the form.
    * @param array $ids
    *   Reference array contains the id.
    *
-   * @static
    * @return object
    */
   public static function add(&$params, &$ids = array()) {
@@ -118,12 +114,11 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
   }
 
   /**
-   * Delete financial Types
+   * Delete financial Types.
    *
    * @param int $financialTypeId
    *
    * @return array|bool
-   * @static
    */
   public static function del($financialTypeId) {
     $financialType = new CRM_Financial_DAO_FinancialType();
@@ -165,11 +160,11 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
   }
 
   /**
-   * To fetch financial type having relationship as Income Account is
+   * fetch financial type having relationship as Income Account is.
    *
    *
-   * @return array  all financial type with income account is relationship
-   * @static
+   * @return array
+   *   all financial type with income account is relationship
    */
   public static function getIncomeFinancialType() {
     // Financial Type
@@ -192,4 +187,5 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
     }
     return $financialType;
   }
+
 }