From 414c1420810013a36a2e72d485f0859372802108 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Jan 2015 11:41:09 -0800 Subject: [PATCH] INFRA-132 - CRM/Price - Convert single-line @param to multi-line --- CRM/Price/BAO/LineItem.php | 48 ++++++++++++------- CRM/Price/BAO/PriceField.php | 56 ++++++++++++++-------- CRM/Price/BAO/PriceFieldValue.php | 45 ++++++++++++------ CRM/Price/BAO/PriceSet.php | 78 ++++++++++++++++++++----------- CRM/Price/Form/Field.php | 3 +- CRM/Price/Form/Option.php | 3 +- CRM/Price/Form/Set.php | 9 ++-- CRM/Price/Page/Field.php | 3 +- CRM/Price/Page/Option.php | 3 +- CRM/Price/Page/Set.php | 12 +++-- 10 files changed, 172 insertions(+), 88 deletions(-) diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index 384dbc8be9..67fbde540d 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -48,7 +48,8 @@ class CRM_Price_BAO_LineItem extends CRM_Price_DAO_LineItem { /** * Creates a new entry in the database. * - * @param array $params (reference) an assoc array of name/value pairs + * @param array $params + * (reference) an assoc array of name/value pairs. * * @return CRM_Price_DAO_LineItem object * @static @@ -89,8 +90,10 @@ class CRM_Price_BAO_LineItem extends CRM_Price_DAO_LineItem { * price_field_id. This is the inverse function of create. It also * stores all of the retrieved values in the default array. * - * @param array $params (reference ) an assoc array of name/value pairs - * @param array $defaults (reference ) an assoc array to hold the flattened values + * @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_Price_BAO_LineItem object * @static @@ -135,14 +138,17 @@ AND li.entity_id = {$entityId} * Given a participant id/contribution id, * return contribution/fee line items * - * @param $entityId int participant/contribution id - * @param $entity string participant/contribution. + * @param $entityId + * Int participant/contribution id. + * @param $entity + * String participant/contribution. * * @param null $isQuick * @param bool $isQtyZero * @param bool $relatedEntity * - * @param string $overrideWhereClause e.g "WHERE contribution id = 7 " per the getLineItemsByContributionID wrapper. + * @param string $overrideWhereClause + * E.g "WHERE contribution id = 7 " per the getLineItemsByContributionID wrapper. * this function precedes the convenience of the contribution id but since it does quite a bit more than just a db retrieval we need to be able to use it even * when we don't want it's entity-id magix * @@ -257,11 +263,15 @@ AND li.entity_id = {$entityId} * This method will create the lineItem array required for * processAmount method * - * @param int $fid price set field id - * @param array $params reference to form values - * @param array $fields reference to array of fields belonging + * @param int $fid + * Price set field id. + * @param array $params + * Reference to form values. + * @param array $fields + * Reference to array of fields belonging. * to the price set used for particular event - * @param array $values reference to the values array( + * @param array $values + * Reference to the values array(. this is * lineItem array) * @@ -349,9 +359,11 @@ AND li.entity_id = {$entityId} * Process price set and line items. * * @param int $entityId - * @param array $lineItem line item array + * @param array $lineItem + * Line item array. * @param object $contributionDetails - * @param string $entityTable entity table + * @param string $entityTable + * Entity table. * * @param bool $update * @@ -457,11 +469,14 @@ AND li.entity_id = {$entityId} /** * Build line items array. - * @param array $params form values + * @param array $params + * Form values. * - * @param string $entityId entity id + * @param string $entityId + * Entity id. * - * @param string $entityTable entity Table + * @param string $entityTable + * Entity Table. * * @return void * @static @@ -519,7 +534,8 @@ AND li.entity_id = {$entityId} /** * Calculate tax rate in percentage * - * @param $lineItemId an assoc array of lineItem + * @param $lineItemId + * An assoc array of lineItem. * * @return tax rate * diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index 454378f32f..7645875439 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -48,7 +48,8 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { * price field object. the params array could contain 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 CRM_Price_BAO_PriceField object * @static @@ -71,7 +72,8 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { * * This function is invoked from within the web form layer and also from the api layer * - * @param array $params (reference) an assoc array of name/value pairs + * @param array $params + * (reference) an assoc array of name/value pairs. * * @return CRM_Price_DAO_PriceField object * @static @@ -168,8 +170,10 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { /** * 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 + * @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_Price_DAO_PriceField object * @static @@ -181,8 +185,10 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { /** * Update the is_active flag in the db * - * @param int $id Id of the database record - * @param boolean $is_active Value we want to set the is_active field + * @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 * @@ -202,7 +208,8 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { /** * Get the field title. * - * @param int $id id of field. + * @param int $id + * Id of field. * * @return string name * @@ -216,12 +223,16 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { /** * This function for building custom fields * - * @param CRM_Core_Form $qf form object (reference) - * @param string $elementName name of the custom field + * @param CRM_Core_Form $qf + * Form object (reference). + * @param string $elementName + * Name of the custom field. * @param int $fieldId - * @param boolean $inactiveNeeded - * @param boolean $useRequired true if required else false - * @param string $label label for custom field + * @param bool $inactiveNeeded + * @param bool $useRequired + * True if required else false. + * @param string $label + * Label for custom field. * * @param null $fieldOptions * @param array $freezeOptions @@ -545,9 +556,12 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { /** * Retrieve a list of options for the specified field * - * @param int $fieldId price field ID - * @param bool $inactiveNeeded include inactive options - * @param bool $reset ignore stored values\ + * @param int $fieldId + * Price field ID. + * @param bool $inactiveNeeded + * Include inactive options. + * @param bool $reset + * Ignore stored values\. * * @return array array of options */ @@ -608,7 +622,8 @@ WHERE /** * Delete the price set field. * - * @param int $id Field Id + * @param int $id + * Field Id. * * @return boolean * @@ -654,7 +669,8 @@ WHERE /** * Validate the priceset * - * @param int $priceSetId , array $fields + * @param int $priceSetId + * , array $fields. * * retrun the error string * @@ -754,8 +770,10 @@ WHERE id IN (" . implode(',', array_keys($priceFields)) . ')'; * Generate the label for price fields based on tax display setting option on CiviContribute Component Settings page. * * @param array $opt - * @param string $valueFieldName amount - * @param string $displayOpt tax display setting option + * @param string $valueFieldName + * Amount. + * @param string $displayOpt + * Tax display setting option. * * @return string $label tax label for custom field * diff --git a/CRM/Price/BAO/PriceFieldValue.php b/CRM/Price/BAO/PriceFieldValue.php index 2c46ada1f7..0f7ca83eae 100644 --- a/CRM/Price/BAO/PriceFieldValue.php +++ b/CRM/Price/BAO/PriceFieldValue.php @@ -42,7 +42,8 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { /** * Insert/update a new entry in the database. * - * @param array $params (reference), array $ids + * @param array $params + * (reference), array $ids. * * @param $ids * @@ -70,7 +71,8 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { /** * Creates a new entry in the database. * - * @param array $params (reference), array $ids + * @param array $params + * (reference), array $ids. * * @param $ids * @@ -124,8 +126,10 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { * Takes a bunch of params that are needed to match certain criteria and * retrieves the relevant objects. * - * @param array $params (reference ) an assoc array - * @param array $defaults (reference ) an assoc array to hold the flattened values + * @param array $params + * (reference ) an assoc array. + * @param array $defaults + * (reference ) an assoc array to hold the flattened values. * * @return CRM_Price_DAO_PriceFieldValue object * @static @@ -137,9 +141,12 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { /** * Retrive the all values for given field id * - * @param int $fieldId price_field_id - * @param array $values (reference ) to hold the values - * @param string $orderBy for order by, default weight + * @param int $fieldId + * Price_field_id. + * @param array $values + * (reference ) to hold the values. + * @param string $orderBy + * For order by, default weight. * @param bool|int $isActive is_active, default false * * @return array $values @@ -165,7 +172,8 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { /** * Get the price field option label. * - * @param int $id id of field option. + * @param int $id + * Id of field option. * * @return string name * @@ -179,8 +187,10 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { /** * Update the is_active flag in the db * - * @param int $id Id of the database record - * @param boolean $is_active Value we want to set the is_active field + * @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 * @@ -193,7 +203,8 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { /** * Delete all values of the given field id * - * @param int $fieldId Price field id + * @param int $fieldId + * Price field id. * * * @static @@ -211,7 +222,8 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { /** * Delete the value. * - * @param int $id Id + * @param int $id + * Id. * * @return boolean * @@ -231,9 +243,12 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { * Update civicrm_price_field_value.financial_type_id * when financial_type_id of contribution_page or event is changed * - * @param int $entityId Id - * @param String $entityTable entity table - * @param String $financialTypeID financial type id + * @param int $entityId + * Id. + * @param String $entityTable + * Entity table. + * @param String $financialTypeID + * Financial type id. * * @static */ diff --git a/CRM/Price/BAO/PriceSet.php b/CRM/Price/BAO/PriceSet.php index 1de6fed63b..ed7adbb062 100644 --- a/CRM/Price/BAO/PriceSet.php +++ b/CRM/Price/BAO/PriceSet.php @@ -57,7 +57,8 @@ class CRM_Price_BAO_PriceSet extends CRM_Price_DAO_PriceSet { /** * Takes an associative array and creates a price set object * - * @param array $params (reference) an assoc array of name/value pairs + * @param array $params + * (reference) an assoc array of name/value pairs. * * @return CRM_Price_DAO_PriceSet object * @static @@ -80,8 +81,10 @@ class CRM_Price_BAO_PriceSet extends CRM_Price_DAO_PriceSet { /** * 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 + * @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_Price_DAO_PriceSet object * @static @@ -93,7 +96,8 @@ class CRM_Price_BAO_PriceSet extends CRM_Price_DAO_PriceSet { /** * Update the is_active flag in the db * - * @param int $id id of the database record + * @param int $id + * Id of the database record. * @param $isActive * * @internal param bool $is_active value we want to set the is_active field @@ -154,7 +158,8 @@ WHERE ps.name = '{$entityName}' /** * Get the price set title. * - * @param int $id id of price set + * @param int $id + * Id of price set. * * @return string title * @@ -168,7 +173,8 @@ WHERE ps.name = '{$entityName}' /** * Return a list of all forms which use this price set. * - * @param int $id id of price set + * @param int $id + * Id of price set. * @param bool|string $simpleReturn - get raw data. Possible values: 'entity', 'table' * * @return array @@ -275,7 +281,8 @@ WHERE ct.id = cp.financial_type_id AND /** * Delete the price set * - * @param int $id Price Set id + * @param int $id + * Price Set id. * * @return boolean false if fields exist for this set, true if the * set could be deleted @@ -314,8 +321,8 @@ WHERE ct.id = cp.financial_type_id AND * Link the price set with the specified table and id * * @param string $entityTable - * @param integer $entityId - * @param integer $priceSetId + * @param int $entityId + * @param int $priceSetId * * @return bool */ @@ -343,7 +350,7 @@ WHERE ct.id = cp.financial_type_id AND * Delete price set for the given entity and id * * @param string $entityTable - * @param integer $entityId + * @param int $entityId * * @return mixed */ @@ -360,7 +367,8 @@ WHERE ct.id = cp.financial_type_id AND * * @param string $entityTable * @param int $entityId - * @param int $usedFor ( price set that extends/used for particular component ) + * @param int $usedFor + * ( price set that extends/used for particular component ). * * @param null $isQuickConfig * @param null $setName @@ -396,7 +404,8 @@ WHERE ct.id = cp.financial_type_id AND /** * Find a price_set_id associated with the given option value or field ID * - * @param array $params (reference) an assoc array of name/value pairs + * @param array $params + * (reference) an assoc array of name/value pairs. * array may contain either option id or * price field id * @@ -427,7 +436,8 @@ WHERE ct.id = cp.financial_type_id AND /** * Return an associative array of all price sets * - * @param bool $withInactive whether or not to include inactive entries + * @param bool $withInactive + * Whether or not to include inactive entries. * @param bool|string $extendComponentName name of the component like 'CiviEvent','CiviContribute' * * @return array associative array of id => name @@ -1024,9 +1034,12 @@ WHERE id = %1"; /** * Supports event create function by setting up required price sets, not tested but expect * it will work for contribution page - * @param array $params as passed to api/bao create fn - * @param CRM_Core_DAO $entity object for given entity - * @param string $entityName name of entity - e.g event + * @param array $params + * As passed to api/bao create fn. + * @param CRM_Core_DAO $entity + * Object for given entity. + * @param string $entityName + * Name of entity - e.g event. */ public static function setPriceSets(&$params, $entity, $entityName) { if(empty($params['price_set_id']) || !is_array($params['price_set_id'])) { @@ -1065,7 +1078,8 @@ WHERE id = %1"; /** * Get field ids of a price set * - * @param int $id Price Set id + * @param int $id + * Price Set id. * * @return array of the field ids * @@ -1085,7 +1099,8 @@ WHERE id = %1"; * This function is to make a copy of a price set, including * all the fields * - * @param int $id the price set id to copy + * @param int $id + * The price set id to copy. * * @return the copy object * @static @@ -1131,7 +1146,8 @@ WHERE id = %1"; /** * This function is to check price set permission * - * @param int $sid the price set id + * @param int $sid + * The price set id. * * @return bool */ @@ -1149,7 +1165,8 @@ WHERE id = %1"; * Get the sum of participant count * for all fields of given price set. * - * @param int $sid the price set id + * @param int $sid + * The price set id. * * @param bool $onlyActive * @@ -1210,7 +1227,8 @@ GROUP BY mt.member_of_contact_id"; /** * Check if auto renew option should be shown * - * @param int $priceSetId price set id + * @param int $priceSetId + * Price set id. * * @return int $autoRenewOption ( 0:hide, 1:optional 2:required ) */ @@ -1257,7 +1275,8 @@ GROUP BY mt.member_of_contact_id"; /** * Retrieve auto renew frequency and interval * - * @param int $priceSetId price set id + * @param int $priceSetId + * Price set id. * * @return array associate array of frequency interval and unit * @static @@ -1288,8 +1307,10 @@ GROUP BY mt.member_of_contact_id"; /** * Update the is_quick_config flag in the db * - * @param int $id id of the database record - * @param boolean $isQuickConfig value we want to set the is_quick_config field + * @param int $id + * Id of the database record. + * @param boolean $isQuickConfig + * Value we want to set the is_quick_config field. * * @return Object DAO object on sucess, null otherwise * @static @@ -1341,9 +1362,12 @@ WHERE ps.id = %1 /** * Copy priceSet when event/contibution page is copied * - * @param string $baoName BAO name - * @param int $id old event/contribution page id - * @param int $newId newly created event/contribution page id + * @param string $baoName + * BAO name. + * @param int $id + * Old event/contribution page id. + * @param int $newId + * Newly created event/contribution page id. */ public static function copyPriceSet($baoName, $id, $newId) { $priceSetId = CRM_Price_BAO_PriceSet::getFor($baoName, $id); diff --git a/CRM/Price/Form/Field.php b/CRM/Price/Form/Field.php index 82b70b3926..69a7338339 100644 --- a/CRM/Price/Form/Field.php +++ b/CRM/Price/Form/Field.php @@ -384,7 +384,8 @@ class CRM_Price_Form_Field extends CRM_Core_Form { /** * Global validation rules for the form * - * @param array $fields posted values of the form + * @param array $fields + * Posted values of the form. * * @param $files * @param CRM_Core_Form $form diff --git a/CRM/Price/Form/Option.php b/CRM/Price/Form/Option.php index 2a916b620b..afa883813b 100644 --- a/CRM/Price/Form/Option.php +++ b/CRM/Price/Form/Option.php @@ -269,7 +269,8 @@ class CRM_Price_Form_Option extends CRM_Core_Form { /** * Global validation rules for the form * - * @param array $fields posted values of the form + * @param array $fields + * Posted values of the form. * * @param $files * @param CRM_Core_Form $form diff --git a/CRM/Price/Form/Set.php b/CRM/Price/Form/Set.php index 426f8fdb1e..0270dc3ada 100644 --- a/CRM/Price/Form/Set.php +++ b/CRM/Price/Form/Set.php @@ -79,9 +79,12 @@ class CRM_Price_Form_Set extends CRM_Core_Form { /** * Global form rule * - * @param array $fields the input form values - * @param array $files the uploaded files if any - * @param array $options additional user data + * @param array $fields + * The input form values. + * @param array $files + * The uploaded files if any. + * @param array $options + * Additional user data. * * @return true if no errors, else array of errors * @static diff --git a/CRM/Price/Page/Field.php b/CRM/Price/Page/Field.php index e15d91de71..4d3bbe61e6 100644 --- a/CRM/Price/Page/Field.php +++ b/CRM/Price/Page/Field.php @@ -215,7 +215,8 @@ class CRM_Price_Page_Field extends CRM_Core_Page { * * editing would involved modifying existing fields + adding data to new fields. * - * @param string $action the action to be invoked + * @param string $action + * The action to be invoked. * * @return void diff --git a/CRM/Price/Page/Option.php b/CRM/Price/Page/Option.php index 759361b015..270c338b17 100644 --- a/CRM/Price/Page/Option.php +++ b/CRM/Price/Page/Option.php @@ -198,7 +198,8 @@ class CRM_Price_Page_Option extends CRM_Core_Page { * * editing would involved modifying existing fields + adding data to new fields. * - * @param string $action the action to be invoked + * @param string $action + * The action to be invoked. * * @return void */ diff --git a/CRM/Price/Page/Set.php b/CRM/Price/Page/Set.php index 28de94b593..9a462eb21d 100644 --- a/CRM/Price/Page/Set.php +++ b/CRM/Price/Page/Set.php @@ -200,8 +200,10 @@ class CRM_Price_Page_Set extends CRM_Core_Page { /** * Edit price set * - * @param int $sid price set id - * @param string $action the action to be invoked + * @param int $sid + * Price set id. + * @param string $action + * The action to be invoked. * * @return void */ @@ -221,7 +223,8 @@ class CRM_Price_Page_Set extends CRM_Core_Page { /** * Preview price set * - * @param int $sid price set id + * @param int $sid + * Price set id. * * @return void */ @@ -244,7 +247,8 @@ class CRM_Price_Page_Set extends CRM_Core_Page { /** * Browse all price sets * - * @param string $action the action to be invoked + * @param string $action + * The action to be invoked. * * @return void */ -- 2.25.1