Skip to content

Commit 8010523

Browse files
committed
Fix PSR-2 compliance
1 parent 1a1d5e7 commit 8010523

20 files changed

+52
-54
lines changed

src/DirectGateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function getDefaultParameters()
2626
{
2727
return array(
2828
'customerId' => '',
29-
'testMode' => false,
29+
'testMode' => false,
3030
);
3131
}
3232

src/Message/AbstractRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* eWAY Rapid Abstract Request
44
*/
5-
5+
66
namespace Omnipay\Eway\Message;
77

88
/**
@@ -83,7 +83,7 @@ public function setInvoiceReference($value)
8383
{
8484
return $this->setParameter('invoiceReference', $value);
8585
}
86-
86+
8787
protected function getBaseData()
8888
{
8989
$data = array();

src/Message/AbstractResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* eWAY Rapid Abstract Response
44
*/
5-
5+
66
namespace Omnipay\Eway\Message;
77

88
/**

src/Message/DirectCaptureRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class DirectCaptureRequest extends DirectAbstractRequest
1515
public function getData()
1616
{
1717
$this->validate('transactionId');
18-
18+
1919
$xml = '<?xml version="1.0"?><ewaygateway></ewaygateway>';
2020
$sxml = new \SimpleXMLElement($xml);
2121

src/Message/DirectRefundRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getRefundPassword()
2525
public function getData()
2626
{
2727
$this->validate('refundPassword', 'transactionId');
28-
28+
2929
$xml = '<?xml version="1.0"?><ewaygateway></ewaygateway>';
3030
$sxml = new \SimpleXMLElement($xml);
3131

src/Message/DirectResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function getTransactionReference()
2626
if (empty($this->data->ewayTrxnNumber)) {
2727
return null;
2828
}
29-
29+
3030
return (int) $this->data->ewayTrxnNumber;
3131
}
3232

src/Message/RapidCaptureRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* eWAY Rapid Capture Request
44
*/
5-
5+
66
namespace Omnipay\Eway\Message;
77

88
/**
@@ -51,7 +51,7 @@ public function getEndpoint()
5151
{
5252
return $this->getEndpointBase().'/CapturePayment';
5353
}
54-
54+
5555
public function sendData($data)
5656
{
5757
// This request uses the REST endpoint and requires the JSON content type header

src/Message/RapidCompletePurchaseRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* eWAY Rapid Complete Purchase Request
44
*/
5-
5+
66
namespace Omnipay\Eway\Message;
77

88
/**

src/Message/RapidDirectAbstractRequest.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* eWAY Rapid Direct Abstract Request
44
*/
5-
5+
66
namespace Omnipay\Eway\Message;
77

88
/**
@@ -18,7 +18,7 @@ public function getEncryptedCardNumber()
1818
{
1919
return $this->getParameter('encryptedCardNumber');
2020
}
21-
21+
2222
/**
2323
* Sets the encrypted card number, for use when submitting card data
2424
* encrypted using eWAY's client side encryption.
@@ -30,7 +30,7 @@ public function setEncryptedCardNumber($value)
3030
{
3131
return $this->setParameter('encryptedCardNumber', $value);
3232
}
33-
33+
3434
public function getEncryptedCardCvv()
3535
{
3636
return $this->getParameter('encryptedCardCvv');
@@ -47,32 +47,31 @@ public function setEncryptedCardCvv($value)
4747
{
4848
return $this->setParameter('encryptedCardCvv', $value);
4949
}
50-
50+
5151
protected function getBaseData()
5252
{
53-
5453
$data = parent::getBaseData();
5554
$data['TransactionType'] = $this->getTransactionType();
56-
55+
5756
if ($this->getCardReference()) {
5857
$data['Customer']['TokenCustomerID'] = $this->getCardReference();
5958
} else {
6059
$this->validate('card');
6160
}
62-
61+
6362
if ($this->getCard()) {
6463
$data['Customer']['CardDetails'] = array();
6564
$data['Customer']['CardDetails']['Name'] = $this->getCard()->getName();
6665
$data['Customer']['CardDetails']['ExpiryMonth'] = $this->getCard()->getExpiryDate('m');
6766
$data['Customer']['CardDetails']['ExpiryYear'] = $this->getCard()->getExpiryDate('y');
6867
$data['Customer']['CardDetails']['CVN'] = $this->getCard()->getCvv();
69-
68+
7069
if ($this->getEncryptedCardNumber()) {
7170
$data['Customer']['CardDetails']['Number'] = $this->getEncryptedCardNumber();
7271
} else {
7372
$data['Customer']['CardDetails']['Number'] = $this->getCard()->getNumber();
7473
}
75-
74+
7675
if ($this->getEncryptedCardCvv()) {
7776
$data['Customer']['CardDetails']['CVN'] = $this->getEncryptedCardCvv();
7877
} else {
@@ -83,7 +82,7 @@ protected function getBaseData()
8382
$data['Customer']['CardDetails']['StartMonth'] = $this->getCard()->getStartDate('m');
8483
$data['Customer']['CardDetails']['StartYear'] = $this->getCard()->getStartDate('y');
8584
}
86-
85+
8786
if ($this->getCard()->getIssueNumber()) {
8887
$data['Customer']['CardDetails']['IssueNumber'] = $this->getCard()->getIssueNumber();
8988
}

src/Message/RapidDirectAuthorizeRequest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
/**
33
* eWAY Rapid Direct Authorise Request
44
*/
5-
5+
66
namespace Omnipay\Eway\Message;
77

88
/**
99
* eWAY Rapid Direct Authorise Request
1010
*
11-
* Completes an authorise transaction (pre-auth) using eWAY's Rapid Direct
11+
* Completes an authorise transaction (pre-auth) using eWAY's Rapid Direct
1212
* Connection API. This looks exactly like a RapidDirectPurchaseRequest,
1313
* except the Method is set to "Authorise" (note British English spelling).
14-
*
14+
*
1515
* The returned transaction ID (use getTransactionReference()) can be used to
1616
* capture the payment.
1717
*
@@ -70,7 +70,7 @@ class RapidDirectAuthorizeRequest extends RapidDirectAbstractRequest
7070
public function getData()
7171
{
7272
$data = $this->getBaseData();
73-
73+
7474
$this->validate('amount');
7575

7676
$data['Payment'] = array();
@@ -79,9 +79,9 @@ public function getData()
7979
$data['Payment']['InvoiceDescription'] = $this->getDescription();
8080
$data['Payment']['CurrencyCode'] = $this->getCurrency();
8181
$data['Payment']['InvoiceReference'] = $this->getInvoiceReference();
82-
82+
8383
$data['Method'] = 'Authorise';
84-
84+
8585
return $data;
8686
}
8787

0 commit comments

Comments
 (0)