* API result array
*/
function tax_contribution_page_create_example() {
- $params = array(
+ $params = [
'contact_id' => 1,
'receive_date' => '20120511',
'total_amount' => '100',
'invoice_id' => 67890,
'source' => 'SSF',
'contribution_status_id' => 2,
- );
+ ];
try{
$result = civicrm_api3('tax_contribution_page', 'create', $params);
$errorMessage = $e->getMessage();
$errorCode = $e->getErrorCode();
$errorData = $e->getExtraParams();
- return array(
+ return [
'error' => $errorMessage,
'error_code' => $errorCode,
'error_data' => $errorData,
- );
+ ];
}
return $result;
*/
function tax_contribution_page_create_expectedresult() {
- $expectedResult = array(
+ $expectedResult = [
'is_error' => 0,
'version' => 3,
'count' => 1,
'id' => 1,
- 'values' => array(
- '1' => array(
+ 'values' => [
+ '1' => [
'id' => '1',
'contact_id' => '1',
'financial_type_id' => '11',
'creditnote_id' => '',
'tax_amount' => '20',
'contribution_type_id' => '11',
- ),
- ),
- );
+ ],
+ ],
+ ];
return $expectedResult;
}