From 1fd111c8328003c25200d0a1f6288674627ba8e4 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 27 Apr 2014 15:41:34 -0700 Subject: [PATCH] comment & formatting fixes --- api/v3/OptionValue.php | 10 ++++++---- api/v3/Product.php | 8 ++++++++ tests/phpunit/api/v3/SyntaxConformanceTest.php | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/api/v3/OptionValue.php b/api/v3/OptionValue.php index ad2bd40292..6f83e2b564 100644 --- a/api/v3/OptionValue.php +++ b/api/v3/OptionValue.php @@ -3,7 +3,9 @@ /** * Retrieve one or more OptionValues * - * @param array $ params input parameters + * @param $params + * + * @internal param $array $ params input parameters * * {@example OptionValueGet.php 0} * @example OptionValueGet.php @@ -33,15 +35,15 @@ function civicrm_api3_option_value_get($params) { * * {@example OptionValueCreate.php} * + * @param $params + * + * @throws API_Exception * @return array of newly created option_value property values. * {@getfields OptionValue_create} * @access public */ function civicrm_api3_option_value_create($params) { $result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); - - // CRM-13814 : evalute option group id - // option group id would be passed in case of adding a new option value record if (!empty($params['id']) && !array_key_exists('option_group_id', $params)) { $groupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $params['id'], 'option_group_id', 'id' diff --git a/api/v3/Product.php b/api/v3/Product.php index 89864e1f14..e4f7bd32bf 100644 --- a/api/v3/Product.php +++ b/api/v3/Product.php @@ -41,6 +41,9 @@ * {@getfields product_create} * @example productCreate.php * + * @param $params + * + * @throws API_Exception * @return array of newly created product property values. * @access public */ @@ -55,6 +58,8 @@ function civicrm_api3_product_create($params) { * {@getfields product_get} * @example productCreate.php * + * @param $params + * * @return array of retrieved product property values. * @access public */ @@ -69,6 +74,9 @@ function civicrm_api3_product_get($params) { * {@getfields product_delete} * @example productCreate.php * + * @param $params + * + * @throws API_Exception * @return array of deleted values. * @access public */ diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index 4a2b0ec7e0..b676e44173 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -767,7 +767,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { $return = array_keys($fieldsGet['values']); $valuesNotToReturn = $this->getKnownUnworkablesUpdateSingle($entityName, 'break_return'); // these can't be requested as return values - $entityValuesThatDontWork = array_merge( + $entityValuesThatDoNotWork = array_merge( $this->getKnownUnworkablesUpdateSingle($entityName, 'cant_update'), $this->getKnownUnworkablesUpdateSingle($entityName, 'cant_return'), $valuesNotToReturn @@ -796,7 +796,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { $fieldName = $specs['uniquename']; } if ($field == 'currency' || $field == 'id' || $field == strtolower($entityName) . '_id' - || in_array($field,$entityValuesThatDontWork)) { + || in_array($field,$entityValuesThatDoNotWork)) { //@todo id & entity_id are correct but we should fix currency & frequency_day continue; } -- 2.25.1