* Array to be passed to function.
*
* @throws CiviCRM_API3_Exception
+ *
* @return array
*/
-function civicrm_api3($entity, $action, $params = array()) {
+function civicrm_api3($entity, $action, $params = []) {
$params['version'] = 3;
$result = \Civi::service('civi_api_kernel')->runSafe($entity, $action, $params);
if (is_array($result) && !empty($result['is_error'])) {
// $apiRequest['params']['action'] = $apiRequest['params']['api_action'];
// unset($apiRequest['params']['api_action']);
}
- return array('action' => array('api.aliases' => array('api_action')));
+ return ['action' => ['api.aliases' => ['api_action']]];
}
- $getFieldsParams = array('action' => $apiRequest['action']);
+ $getFieldsParams = ['action' => $apiRequest['action']];
$entity = $apiRequest['entity'];
if ($entity == 'Profile' && array_key_exists('profile_id', $apiRequest['params'])) {
$getFieldsParams['profile_id'] = $apiRequest['params']['profile_id'];