From 2fabb298d539c0638548cd39f38bed892e4bb205 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Wed, 20 Jan 2016 16:38:25 +0530 Subject: [PATCH] CRM-16259, fixed Jenkins style check error ---------------------------------------- * CRM-16259: Create Payment API https://issues.civicrm.org/jira/browse/CRM-16259 --- api/v3/Payment.php | 2 +- tests/phpunit/api/v3/PaymentTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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'); } -- 2.25.1