Merge pull request #15109 from civicrm/5.17
[civicrm-core.git] / api / v3 / examples / ParticipantPayment / Delete.php
index 7088a0d18e8807ce7bae36d16b96097f0f913f19..fd07bbc3774e8f3dcbb4b2b5fdc035cdaf7e7960 100644 (file)
@@ -6,9 +6,9 @@
  *   API result array
  */
 function participant_payment_delete_example() {
-  $params = array(
-    'id' => 5,
-  );
+  $params = [
+    'id' => 6,
+  ];
 
   try{
     $result = civicrm_api3('ParticipantPayment', 'delete', $params);
@@ -18,11 +18,12 @@ function participant_payment_delete_example() {
     $errorMessage = $e->getMessage();
     $errorCode = $e->getErrorCode();
     $errorData = $e->getExtraParams();
-    return array(
-      'error' => $errorMessage,
+    return [
+      'is_error' => 1,
+      'error_message' => $errorMessage,
       'error_code' => $errorCode,
       'error_data' => $errorData,
-    );
+    ];
   }
 
   return $result;
@@ -36,12 +37,12 @@ function participant_payment_delete_example() {
  */
 function participant_payment_delete_expectedresult() {
 
-  $expectedResult = array(
+  $expectedResult = [
     'is_error' => 0,
     'version' => 3,
     'count' => 1,
     'values' => 1,
-  );
+  ];
 
   return $expectedResult;
 }
@@ -53,17 +54,17 @@ function participant_payment_delete_expectedresult() {
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantPaymentTest.php
 *
 * You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
 *
 * To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
 *
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
 *
 * Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
 *
 * API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
 */