X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2Fexamples%2FSetting%2FCreateAllDomains.php;h=7cfef55b75779acf1a88c1147b63fae97c3341f0;hb=cf8f0fff2d9b29aeeb6b511208054da760b4d544;hp=37a4d5efc4b86e3a81666bcc3a935a3b7800d80f;hpb=a7f476a5ea1b392388beaaadae308adddc0efe08;p=civicrm-core.git diff --git a/api/v3/examples/Setting/CreateAllDomains.php b/api/v3/examples/Setting/CreateAllDomains.php index 37a4d5efc4..7cfef55b75 100644 --- a/api/v3/examples/Setting/CreateAllDomains.php +++ b/api/v3/examples/Setting/CreateAllDomains.php @@ -8,10 +8,10 @@ * API result array */ function setting_create_example() { - $params = array( + $params = [ 'domain_id' => 'all', 'uniq_email_per_site' => 1, - ); + ]; try{ $result = civicrm_api3('Setting', 'create', $params); @@ -21,12 +21,12 @@ function setting_create_example() { $errorMessage = $e->getMessage(); $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); - return array( + return [ 'is_error' => 1, 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, - ); + ]; } return $result; @@ -40,22 +40,22 @@ function setting_create_example() { */ function setting_create_expectedresult() { - $expectedResult = array( + $expectedResult = [ 'is_error' => 0, 'version' => 3, 'count' => 3, - 'values' => array( - '1' => array( + 'values' => [ + '1' => [ 'uniq_email_per_site' => '1', - ), - '2' => array( + ], + '2' => [ 'uniq_email_per_site' => '1', - ), - '3' => array( + ], + '3' => [ 'uniq_email_per_site' => '1', - ), - ), - ); + ], + ], + ]; return $expectedResult; }