X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2Fexamples%2FMailing%2FSubmit.php;h=d2971de198c3fbb7b87c5aedc267fbfc7a9194a5;hb=cf8f0fff2d9b29aeeb6b511208054da760b4d544;hp=ffaae8983dd93e0a0ea4cf2672a862a206b9fdd7;hpb=a7f476a5ea1b392388beaaadae308adddc0efe08;p=civicrm-core.git diff --git a/api/v3/examples/Mailing/Submit.php b/api/v3/examples/Mailing/Submit.php index ffaae8983d..d2971de198 100644 --- a/api/v3/examples/Mailing/Submit.php +++ b/api/v3/examples/Mailing/Submit.php @@ -6,11 +6,11 @@ * API result array */ function mailing_submit_example() { - $params = array( + $params = [ 'scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00', 'id' => 18, - ); + ]; try{ $result = civicrm_api3('Mailing', 'submit', $params); @@ -20,12 +20,12 @@ function mailing_submit_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; @@ -39,13 +39,13 @@ function mailing_submit_example() { */ function mailing_submit_expectedresult() { - $expectedResult = array( + $expectedResult = [ 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 18, - 'values' => array( - '18' => array( + 'values' => [ + '18' => [ 'id' => '18', 'domain_id' => '1', 'header_id' => '', @@ -90,9 +90,9 @@ https://civicrm.org 'location_type_id' => '', 'email_selection_method' => 'automatic', 'language' => '', - ), - ), - ); + ], + ], + ]; return $expectedResult; }