From: Pradeep Nayak Date: Wed, 20 Jan 2016 11:08:25 +0000 (+0530) Subject: CRM-16259, fixed Jenkins style check error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2fabb298d539c0638548cd39f38bed892e4bb205;p=civicrm-core.git CRM-16259, fixed Jenkins style check error ---------------------------------------- * CRM-16259: Create Payment API https://issues.civicrm.org/jira/browse/CRM-16259 --- diff --git a/api/v3/Payment.php b/api/v3/Payment.php index 8c171e8a4b..709a57bdd1 100644 --- a/api/v3/Payment.php +++ b/api/v3/Payment.php @@ -121,7 +121,7 @@ function civicrm_api3_payment_cancel(&$params) { */ function civicrm_api3_payment_create(&$params) { // Check if it is an update - if (CRM_Utils_Array::value ('id', $params)) { + if (CRM_Utils_Array::value('id', $params)) { $amount = $params['total_amount']; civicrm_api3('Payment', 'cancel', $params); $params['total_amount'] = $amount; diff --git a/tests/phpunit/api/v3/PaymentTest.php b/tests/phpunit/api/v3/PaymentTest.php index f56f8aaf08..da05c3b20d 100644 --- a/tests/phpunit/api/v3/PaymentTest.php +++ b/tests/phpunit/api/v3/PaymentTest.php @@ -317,7 +317,7 @@ class api_v3_PaymentTest extends CiviUnitTestCase { /** * Test cancel payment api - */ + */ public function testCancelPayment() { list($lineItems, $contribution) = $this->createParticipantWithContribution(); @@ -336,7 +336,7 @@ class api_v3_PaymentTest extends CiviUnitTestCase { $payment = $this->callAPIAndDocument('payment', 'get', $params, __FUNCTION__, __FILE__); $this->assertEquals(2, $payment['count']); $amounts = array(-150.00, 150.00); - foreach($payment['values'] as $value) { + foreach ($payment['values'] as $value) { $this->assertEquals($value['total_amount'], array_pop($amounts), 'Mismatch total amount'); }