X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FDiscount.php;h=c474aa5107a0d2cd68e0a60083387a9c8ae43c77;hb=a946aa64b981cfd2738fa06fa9ce34dd5b76f5f7;hp=abe7e253531eb4067ea9565a4cbf6d3ebd019211;hpb=ef10e0b52408ba266239a859756d757a10348228;p=civicrm-core.git diff --git a/CRM/Core/BAO/Discount.php b/CRM/Core/BAO/Discount.php index abe7e25353..c474aa5107 100644 --- a/CRM/Core/BAO/Discount.php +++ b/CRM/Core/BAO/Discount.php @@ -50,9 +50,9 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount { * @return boolean * @static */ - public static function del($entityId,$entityTable) { + public static function del($entityId, $entityTable) { // delete all discount records with the selected discounted id - $discount = new CRM_Core_DAO_Discount( ); + $discount = new CRM_Core_DAO_Discount(); $discount->entity_id = $entityId; $discount->entity_table = $entityTable; if ($discount->delete()) { @@ -67,13 +67,14 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount { * discount object. the params array contains additional unused name/value * pairs * - * @param array $params (reference) an assoc array of name/value pairs + * @param array $params + * (reference) an assoc array of name/value pairs. * * @return object CRM_Core_DAO_Discount object on success, otherwise null * @static */ public static function add(&$params) { - $discount = new CRM_Core_DAO_Discount( ); + $discount = new CRM_Core_DAO_Discount(); $discount->copyValues($params); $discount->save(); return $discount; @@ -83,15 +84,17 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount { * Determine whether the given table/id * has discount associated with it * - * @param integer $entityId entity id to be searched - * @param string $entityTable entity table to be searched + * @param int $entityIdEntity id to be searched. + * Entity id to be searched. + * @param string $entityTable + * Entity table to be searched. * * @return array $optionGroupIDs option group Ids associated with discount * */ public static function getOptionGroup($entityId, $entityTable) { $optionGroupIDs = array(); - $dao = new CRM_Core_DAO_Discount( ); + $dao = new CRM_Core_DAO_Discount(); $dao->entity_id = $entityId; $dao->entity_table = $entityTable; $dao->find(); @@ -104,8 +107,10 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount { /** * Determine in which discount set the registration date falls * - * @param int $entityID entity id to be searched - * @param string $entityTable entity table to be searched + * @param int $entityID + * Entity id to be searched. + * @param string $entityTable + * Entity table to be searched. * * @return integer $dao->id discount id of the set which matches * the date criteria @@ -117,7 +122,7 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount { return NULL; } - $dao = new CRM_Core_DAO_Discount( ); + $dao = new CRM_Core_DAO_Discount(); $dao->entity_id = $entityID; $dao->entity_table = $entityTable; $dao->find();