Fixed Code clean up for batch 15
[civicrm-core.git] / CRM / Price / BAO / PriceFieldValue.php
index 8f9f8e92aaa69f7844614150224ed373d9562dc7..da14f6d76f2dd39017d9604ba9ed74cdb4eeb503 100644 (file)
@@ -47,8 +47,7 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
    *
    * @param $ids
    *
-   * @return CRM_Price_DAO_PriceFieldValue object
-   * @static
+   * @return CRM_Price_DAO_PriceFieldValue
    */
   public static function add(&$params, $ids = array()) {
 
@@ -76,20 +75,20 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
    *
    * @param $ids
    *
-   * @return CRM_Price_DAO_PriceFieldValue object
-   * @static
+   * @return CRM_Price_DAO_PriceFieldValue
    */
   public static function create(&$params, $ids = array()) {
     $id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids));
     if (!is_array($params) || empty($params)) {
-      return;
+      return NULL;
     }
-    if(!$id && empty($params['name'])) {
+    if (!$id && empty($params['name'])) {
       $params['name'] = strtolower(CRM_Utils_String::munge($params['label'], '_', 242));
     }
 
-    if ($id  && !empty($params['weight'])) {
-      if (isset($params['name'])) { unset($params['name']);
+    if ($id && !empty($params['weight'])) {
+      if (isset($params['name'])) {
+        unset($params['name']);
       }
 
       $oldWeight = NULL;
@@ -132,8 +131,7 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
    * @param array $defaults
    *   (reference ) an assoc array to hold the flattened values.
    *
-   * @return CRM_Price_DAO_PriceFieldValue object
-   * @static
+   * @return CRM_Price_DAO_PriceFieldValue
    */
   public static function retrieve(&$params, &$defaults) {
     return CRM_Core_DAO::commonRetrieve('CRM_Price_DAO_PriceFieldValue', $params, $defaults);
@@ -150,9 +148,8 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
    *   For order by, default weight.
    * @param bool|int $isActive is_active, default false
    *
-   * @return array $values
+   * @return array
    *
-   * @static
    */
   public static function getValues($fieldId, &$values, $orderBy = 'weight', $isActive = FALSE) {
     $fieldValueDAO = new CRM_Price_DAO_PriceFieldValue();
@@ -176,9 +173,8 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
    * @param int $id
    *   Id of field option.
    *
-   * @return string name
-   *
-   * @static
+   * @return string
+   *   name
    *
    */
   public static function getOptionLabel($id) {
@@ -193,9 +189,9 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
    * @param bool $is_active
    *   Value we want to set the is_active field.
    *
-   * @return   Object            DAO object on sucess, null otherwise
+   * @return Object
+   *   DAO object on sucess, null otherwise
    *
-   * @static
    */
   public static function setIsActive($id, $is_active) {
     return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceFieldValue', $id, 'is_active', $is_active);
@@ -208,7 +204,6 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
    *   Price field id.
    *
    *
-   * @static
    */
   public static function deleteValues($fieldId) {
     if (!$fieldId) {
@@ -226,9 +221,8 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
    * @param int $id
    *   Id.
    *
-   * @return  boolean
+   * @return bool
    *
-   * @static
    */
   public static function del($id) {
     if (!$id) {
@@ -246,12 +240,11 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
    *
    * @param int $entityId
    *   Id.
-   * @param string $entityTableEntity table.
+   * @param string $entityTable table.
    *   Entity table.
-   * @param string $financialTypeIDFinancial type id.
+   * @param string $financialTypeID type id.
    *   Financial type id.
    *
-   * @static
    */
   public static function updateFinancialType($entityId, $entityTable, $financialTypeID) {
     if (!$entityId || !$entityTable || !$financialTypeID) {