Skip to content

Commit 7fc4f58

Browse files
committed
Apply fixes from StyleCI
1 parent 587f07a commit 7fc4f58

26 files changed

+97
-89
lines changed

index.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212

1313
$gateway->setTestMode(true);
1414

15-
$card = new CreditCard(array(
15+
$card = new CreditCard([
1616
'firstName' => 'Sujip',
1717
'lastName' => 'Thapa',
1818
'number' => '4444333322221111',
1919
'expiryMonth' => '10',
2020
'expiryYear' => '2030',
2121
'cvv' => '123',
22-
));
22+
]);
2323

24-
$response = $gateway->purchase(array(
24+
$response = $gateway->purchase([
2525
'amount' => '12.00',
2626
'transactionId' => 'ORDER-ZYX8',
2727
'currency' => 'AUD',
2828
'card' => $card,
29-
))
29+
])
3030
->send();
3131

3232
$message = sprintf(

src/DirectPostGateway.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ public function getName()
2121

2222
public function getDefaultParameters()
2323
{
24-
return array(
24+
return [
2525
'merchantId' => '',
2626
'transactionPassword' => '',
2727
'testMode' => false,
28-
);
28+
];
2929
}
3030

3131
/**
@@ -69,7 +69,7 @@ public function setTransactionPassword($value)
6969
*
7070
* @return mixed
7171
*/
72-
public function authorize(array $parameters = array())
72+
public function authorize(array $parameters = [])
7373
{
7474
return $this->createRequest('\Omnipay\NABTransact\Message\DirectPostAuthorizeRequest', $parameters);
7575
}
@@ -79,7 +79,7 @@ public function authorize(array $parameters = array())
7979
*
8080
* @return mixed
8181
*/
82-
public function completeAuthorize(array $parameters = array())
82+
public function completeAuthorize(array $parameters = [])
8383
{
8484
return $this->createRequest('\Omnipay\NABTransact\Message\DirectPostCompletePurchaseRequest', $parameters);
8585
}
@@ -89,7 +89,7 @@ public function completeAuthorize(array $parameters = array())
8989
*
9090
* @return mixed
9191
*/
92-
public function purchase(array $parameters = array())
92+
public function purchase(array $parameters = [])
9393
{
9494
return $this->createRequest('\Omnipay\NABTransact\Message\DirectPostPurchaseRequest', $parameters);
9595
}
@@ -99,7 +99,7 @@ public function purchase(array $parameters = array())
9999
*
100100
* @return mixed
101101
*/
102-
public function completePurchase(array $parameters = array())
102+
public function completePurchase(array $parameters = [])
103103
{
104104
return $this->createRequest('\Omnipay\NABTransact\Message\DirectPostCompletePurchaseRequest', $parameters);
105105
}

src/HostedPaymentGateway.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class HostedPaymentGateway extends AbstractGateway
1414
*
1515
* @return mixed
1616
*/
17-
public function completePurchase(array $parameters = array())
17+
public function completePurchase(array $parameters = [])
1818
{
1919
return $this->createRequest('\Omnipay\NABTransact\Message\HostedPaymentCompletePurchaseRequest', $parameters);
2020
}
@@ -37,7 +37,7 @@ public function getName()
3737
*
3838
* @return mixed
3939
*/
40-
public function purchase(array $parameters = array())
40+
public function purchase(array $parameters = [])
4141
{
4242
return $this->createRequest('\Omnipay\NABTransact\Message\HostedPaymentPurchaseRequest', $parameters);
4343
}

src/Message/DirectPostAbstractRequest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ public function generateFingerprint(array $data)
2424
{
2525
$hash = implode(
2626
'|',
27-
array(
27+
[
2828
$data['EPS_MERCHANT'],
2929
$this->getTransactionPassword(),
3030
$data['EPS_TXNTYPE'],
3131
$data['EPS_REFERENCEID'],
3232
$data['EPS_AMOUNT'],
3333
$data['EPS_TIMESTAMP'],
34-
)
34+
]
3535
);
3636

3737
return sha1($hash);
@@ -42,7 +42,7 @@ public function generateFingerprint(array $data)
4242
*/
4343
public function getBaseData()
4444
{
45-
$data = array();
45+
$data = [];
4646

4747
$data['EPS_MERCHANT'] = $this->getMerchantId();
4848
$data['EPS_TXNTYPE'] = $this->txnType;

src/Message/DirectPostAuthorizeRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function getCardData()
4343
{
4444
$this->getCard()->validate();
4545

46-
$data = array();
46+
$data = [];
4747

4848
$data['EPS_CARDNUMBER'] = $this->getCard()->getNumber();
4949
$data['EPS_EXPIRYMONTH'] = $this->getCard()->getExpiryMonth();

src/Message/DirectPostCompletePurchaseRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ public function generateResponseFingerprint($data)
3030
{
3131
$fields = implode(
3232
'|',
33-
array(
33+
[
3434
$data['merchant'],
3535
$this->getTransactionPassword(),
3636
$data['refid'],
3737
$this->getAmount(),
3838
$data['timestamp'],
3939
$data['summarycode'],
40-
)
40+
]
4141
);
4242

4343
return sha1($fields);

src/Message/DirectPostCompletePurchaseResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class DirectPostCompletePurchaseResponse extends AbstractResponse
1414
*/
1515
public function isSuccessful()
1616
{
17-
return $this->summaryCode() && in_array($this->getCode(), array('00', '08', '11'));
17+
return $this->summaryCode() && in_array($this->getCode(), ['00', '08', '11']);
1818
}
1919

2020
public function summaryCode()

src/Message/HostedPaymentPurchaseRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getData()
3030
'paymentAlertEmail'
3131
);
3232

33-
$data = array();
33+
$data = [];
3434

3535
$data['vendor_name'] = $this->getMerchantId();
3636
$data['payment_alert'] = $this->getPaymentAlertEmail();

src/Message/SecureXMLAbstractRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class SecureXMLAbstractRequest extends AbstractRequest
3030
/**
3131
* @var array
3232
*/
33-
protected $requiredFields = array();
33+
protected $requiredFields = [];
3434

3535
/**
3636
* Set the messageID on the request.

src/Message/SecureXMLAuthorizeRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SecureXMLAuthorizeRequest extends SecureXMLAbstractRequest
2020
/**
2121
* @var array
2222
*/
23-
protected $requiredFields = array('amount', 'card', 'transactionId');
23+
protected $requiredFields = ['amount', 'card', 'transactionId'];
2424

2525
/**
2626
* @return mixed

0 commit comments

Comments
 (0)