Merge pull request #16447 from samuelsov/lab#1319
[civicrm-core.git] / api / v3 / Entity.php
index 10234aababcb9289e32e3c2db4af2ff93179ccd3..4bab9fe8935bc4c8ba5df96be52ee59c159aeea2 100644 (file)
@@ -1,13 +1,17 @@
 <?php
 
 /**
- * @deprecated api notice
- * @param array entities
+ * Get list of deprecated entities.
+ *
+ * This is called by the api wrapper when returning the result of api.Entity.get.
+ *
+ * @param array $entities
+ *
  * @return array
  *   Array of deprecated api entities
  */
 function _civicrm_api3_entity_deprecation($entities) {
-  $deprecated = array();
+  $deprecated = [];
   if (!empty($entities['values'])) {
     foreach ($entities['values'] as $entity) {
       if (is_string(_civicrm_api3_deprecation_check($entity))) {
@@ -19,8 +23,12 @@ function _civicrm_api3_entity_deprecation($entities) {
 }
 
 /**
- *  Placeholder function. This should never be called, as it doesn't have any meaning
+ * Placeholder function.
+ *
+ * This should never be called, as it doesn't have any meaning.
+ *
  * @param array $params
+ *
  * @return array
  */
 function civicrm_api3_entity_create($params) {
@@ -28,8 +36,12 @@ function civicrm_api3_entity_create($params) {
 }
 
 /**
- *  Placeholder function. This should never be called, as it doesn't have any meaning
+ * Placeholder function.
+ *
+ * This should never be called, as it doesn't have any meaning.
+ *
  * @param array $params
+ *
  * @return array
  */
 function civicrm_api3_entity_delete($params) {
@@ -37,12 +49,16 @@ function civicrm_api3_entity_delete($params) {
 }
 
 /**
- *  Placeholder function. This should never be called, as it doesn't have any meaning
+ * Placeholder function.
+ *
+ * This should never be called, as it doesn't have any meaning.
+ *
  * @param array $params
+ *
  * @return array
  */
 function civicrm_api3_entity_getfields($params) {
   // we return an empty array so it makes it easier to write generic getdefaults / required tests
   // without putting an exception in for entity
-  return civicrm_api3_create_success(array());
+  return civicrm_api3_create_success([]);
 }