INFRA-132 - Fix misc oddball syntax
[civicrm-core.git] / api / v3 / Generic.php
index 17556f86f30dc0ab0616f4ccfd5dfaf3a7e57cee..ee41baa8a80ccab305cf2cb86beb98fa14f4afc0 100644 (file)
@@ -17,7 +17,7 @@
  *  - version: string
  *  - function: callback (mixed)
  *  - params: array, varies
- *  @return array API success object
+ * @return array API success object
  */
 function civicrm_api3_generic_getfields($apiRequest) {
   static $results = array();
@@ -71,7 +71,7 @@ function civicrm_api3_generic_getfields($apiRequest) {
           $metadata['id']['api.aliases'] = array($lcase_entity . '_id');
         }
       }
-      else{
+      else {
         // really the preference would be to set the unique name in the xml
         // question is which is a less risky fix this close to a release - setting in xml for the known failure
         // (note) or setting for all api where fields is returning 'id' & we want to accept 'note_id' @ the api layer
@@ -104,7 +104,8 @@ function civicrm_api3_generic_getfields($apiRequest) {
           'title' => 'Context',
         ),
       );
-        break;
+      break;
+
     default:
       // oddballs are on their own
       $metadata = array();
@@ -152,7 +153,7 @@ function civicrm_api3_generic_getfields($apiRequest) {
 function civicrm_api3_generic_getcount($apiRequest) {
   $apiRequest['params']['options']['is_count'] = TRUE;
   $result = civicrm_api($apiRequest['entity'], 'get', $apiRequest['params']);
-  if (is_numeric (CRM_Utils_Array::value('values', $result))) {
+  if (is_numeric(CRM_Utils_Array::value('values', $result))) {
     return (int) $result['values'];
   }
   if (!isset($result['count'])) {