X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2Fexamples%2FPriceSet%2FCreate.php;h=be4f7fd9bcf9c963edc4dd73de11e64a230e8c1f;hb=cf8f0fff2d9b29aeeb6b511208054da760b4d544;hp=bf801c3eac02522d8d03b1a16bcda4e5ebf50264;hpb=a7f476a5ea1b392388beaaadae308adddc0efe08;p=civicrm-core.git diff --git a/api/v3/examples/PriceSet/Create.php b/api/v3/examples/PriceSet/Create.php index bf801c3eac..be4f7fd9bc 100644 --- a/api/v3/examples/PriceSet/Create.php +++ b/api/v3/examples/PriceSet/Create.php @@ -6,13 +6,13 @@ * API result array */ function price_set_create_example() { - $params = array( + $params = [ 'entity_table' => 'civicrm_event', 'entity_id' => 1, 'name' => 'event price', 'title' => 'event price', 'extends' => 1, - ); + ]; try{ $result = civicrm_api3('PriceSet', 'create', $params); @@ -22,12 +22,12 @@ function price_set_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; @@ -41,13 +41,13 @@ function price_set_create_example() { */ function price_set_create_expectedresult() { - $expectedResult = array( + $expectedResult = [ 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 18, - 'values' => array( - '18' => array( + 'values' => [ + '18' => [ 'id' => '18', 'domain_id' => '', 'name' => 'event price', @@ -61,9 +61,9 @@ function price_set_create_expectedresult() { 'is_quick_config' => '', 'is_reserved' => '', 'min_amount' => '', - ), - ), - ); + ], + ], + ]; return $expectedResult; }