Merge pull request #4971 from kurund/batch-16
[civicrm-core.git] / api / v3 / OptionValue.php
index 6e2eb8e1b9fb57fb7993d0277f92008a4161a8fc..f693c9c0e8ef1a5b6e925933fa6ace7bf016279d 100644 (file)
@@ -8,9 +8,9 @@
  * {@example OptionValueGet.php 0}
  * @example OptionValueGet.php
  *
- * @return  array details of found Option Values
- * {@getfields OptionValue_get}
- * @access public
+ * @return array
+ *   details of found Option Values
+ *   {@getfields OptionValue_get}
  */
 function civicrm_api3_option_value_get($params) {
 
@@ -36,9 +36,9 @@ function civicrm_api3_option_value_get($params) {
  * @param array $params
  *
  * @throws API_Exception
- * @return array of newly created option_value property values.
- * {@getfields OptionValue_create}
- * @access public
+ * @return array
+ *   Array of newly created option_value property values.
+ *   {@getfields OptionValue_create}
  */
 function civicrm_api3_option_value_create($params) {
   $result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
@@ -77,19 +77,18 @@ function _civicrm_api3_option_value_create_spec(&$params) {
  *
  * {@example OptionValueDelete.php 0}
  *
- * @return array Api result
- * {@getfields OptionValue_create}
- * @access public
+ * @return array
+ *   Api result
+ *   {@getfields OptionValue_create}
  */
 function civicrm_api3_option_value_delete($params) {
   // we will get the option group id before deleting so we can flush pseudoconstants
   $optionGroupID = civicrm_api('option_value', 'getvalue', array('version' => 3, 'id' => $params['id'], 'return' => 'option_group_id'));
-  if(CRM_Core_BAO_OptionValue::del((int) $params['id'])){
+  if (CRM_Core_BAO_OptionValue::del((int) $params['id'])) {
     civicrm_api('option_value', 'getfields', array('version' => 3, 'cache_clear' => 1, 'option_group_id' => $optionGroupID));
     return civicrm_api3_create_success();
   }
-  else{
+  else {
     civicrm_api3_create_error('Could not delete OptionValue ' . $params['id']);
   }
 }
-