X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fapi.php;h=9b1a00941d1d670bfd82deb72f25bf29c4d6bdf5;hb=9a7605812a88588b2c65291518016495e6abf00e;hp=04b0421bcbb213757ab02e81d11882094e97e891;hpb=3f8f03061baa434f3bccd999d9fdc31029d30e39;p=civicrm-core.git diff --git a/api/api.php b/api/api.php index 04b0421bcb..9b1a00941d 100644 --- a/api/api.php +++ b/api/api.php @@ -38,7 +38,7 @@ function civicrm_api($entity, $action, $params, $extra = NULL) { * @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'])) { @@ -73,9 +73,9 @@ function _civicrm_api3_api_getfields(&$apiRequest) { // $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'];