phpdoc params is always an array in api
[civicrm-core.git] / api / v3 / EntityTag.php
index d0e20831e69cdd10ce225d72cf8aca1022d34f83..cf265e226b3522cc02ab1fc780b4f7f6cf9d3b0c 100644 (file)
@@ -1,8 +1,7 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  */
 function civicrm_api3_entity_tag_get($params) {
 
-  if(empty($params['entity_id'])) {
+  if (empty($params['entity_id'])) {
     return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
   }
-  else{
+  else {
     //do legacy non-standard behaviour
     $values = CRM_Core_BAO_EntityTag::getTag($params['entity_id'], $params['entity_table']);
     $result = array();
@@ -68,7 +67,8 @@ function civicrm_api3_entity_tag_get($params) {
  * Adjust Metadata for Get action
  *
  * The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ *   Array or parameters determined by getfields.
  */
 function _civicrm_api3_entity_tag_get_spec(&$params) {
   $params['entity_id']['api.aliases'] = array('contact_id');
@@ -88,7 +88,7 @@ function civicrm_api3_entity_tag_create($params) {
 }
 
 /**
- *{@getfields EntityTag_delete}
+ * {@getfields EntityTag_delete}
  * @example EntityTagGet.php
  *
  * @param array $params
@@ -102,6 +102,7 @@ function civicrm_api3_entity_tag_delete($params) {
 
 /**
  * modify metadata
+ * @param array $params
  */
 function _civicrm_api3_entity_tag_delete_spec(&$params) {
   // set as not required as tag_id also acceptable & no either/or std yet
@@ -110,10 +111,11 @@ function _civicrm_api3_entity_tag_delete_spec(&$params) {
 
 /**
  *
- * @param <type> $params
+ * @param array $params
  * @param string $op
  *
- * @return array <type>
+ * @return array
+ *   <type>
  */
 function _civicrm_api3_entity_tag_common($params, $op = 'add') {
 
@@ -162,4 +164,3 @@ function _civicrm_api3_entity_tag_common($params, $op = 'add') {
   }
   return $values;
 }
-