Merge pull request #4997 from monishdeb/CRM-15536
[civicrm-core.git] / CRM / Core / BAO / Discount.php
index a1777447581519042ffe173c94784d933a1c8379..325dabb7f104d90dbfc94f383d13eb1f45d1943a 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -47,13 +47,12 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount {
    * @param int $entityId
    * @param string $entityTable
    *
-   * @return boolean
-   * @static
+   * @return bool
    */
   public static function del($entityId, $entityTable) {
     // delete all discount records with the selected discounted id
     $discount = new CRM_Core_DAO_Discount();
-    $discount->entity_id    = $entityId;
+    $discount->entity_id = $entityId;
     $discount->entity_table = $entityTable;
     if ($discount->delete()) {
       return TRUE;
@@ -72,7 +71,6 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount {
    *
    * @return object
    *   CRM_Core_DAO_Discount object on success, otherwise null
-   * @static
    */
   public static function add(&$params) {
     $discount = new CRM_Core_DAO_Discount();
@@ -85,7 +83,7 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount {
    * Determine whether the given table/id
    * has discount associated with it
    *
-   * @param int $entityIdEntity id to be searched.
+   * @param int $entityId
    *   Entity id to be searched.
    * @param string $entityTable
    *   Entity table to be searched.
@@ -94,9 +92,9 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount {
    *   option group Ids associated with discount
    */
   public static function getOptionGroup($entityId, $entityTable) {
-    $optionGroupIDs    = array();
+    $optionGroupIDs = array();
     $dao = new CRM_Core_DAO_Discount();
-    $dao->entity_id    = $entityId;
+    $dao->entity_id = $entityId;
     $dao->entity_table = $entityTable;
     $dao->find();
     while ($dao->fetch()) {
@@ -113,7 +111,7 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount {
    * @param string $entityTable
    *   Entity table to be searched.
    *
-   * @return integer
+   * @return int
    *   $dao->id       discount id of the set which matches
    *                                 the date criteria
    */
@@ -125,7 +123,7 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount {
     }
 
     $dao = new CRM_Core_DAO_Discount();
-    $dao->entity_id    = $entityID;
+    $dao->entity_id = $entityID;
     $dao->entity_table = $entityTable;
     $dao->find();