Completed
Push — master ( b898e2...1123b6 )
by Dmitry
05:24
created
src/Message/AbstractRequest.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,6 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * Set the purse.
33 33
      *
34
-     * @param string $purse purse
35 34
      *
36 35
      * @return self
37 36
      */
@@ -53,7 +52,6 @@  discard block
 block discarded – undo
53 52
     /**
54 53
      * Set the secret key.
55 54
      *
56
-     * @param string $key secret key
57 55
      *
58 56
      * @return self
59 57
      */
Please login to merge, or discard this patch.
src/Gateway.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@
 block discarded – undo
56 56
     /**
57 57
      * Set the unified purse.
58 58
      *
59
-     * @param string $purse merchant purse
60 59
      *
60
+     * @param string $value
61 61
      * @return self
62 62
      */
63 63
     public function setPurse($value)
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function getAssetDir()
30 30
     {
31
-        return dirname(__DIR__) . '/assets';
31
+        return dirname(__DIR__).'/assets';
32 32
     }
33 33
 
34 34
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      *
93 93
      * @return \Omnipay\ePayService\Message\PurchaseRequest
94 94
      */
95
-    public function purchase(array $parameters = [])
95
+    public function purchase(array $parameters = [ ])
96 96
     {
97 97
         return $this->createRequest('\Omnipay\ePayService\Message\PurchaseRequest', $parameters);
98 98
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      *
103 103
      * @return \Omnipay\ePayService\Message\CompletePurchaseRequest
104 104
      */
105
-    public function completePurchase(array $parameters = [])
105
+    public function completePurchase(array $parameters = [ ])
106 106
     {
107 107
         return $this->createRequest('\Omnipay\ePayService\Message\CompletePurchaseRequest', $parameters);
108 108
     }
Please login to merge, or discard this patch.
tests/_bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,4 +11,4 @@
 block discarded – undo
11 11
 
12 12
 error_reporting(E_ALL & ~E_NOTICE);
13 13
 
14
-require_once __DIR__ . '/../vendor/autoload.php';
14
+require_once __DIR__.'/../vendor/autoload.php';
Please login to merge, or discard this patch.
tests/unit/Message/PurchaseRequestTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@
 block discarded – undo
51 51
     {
52 52
         $data = $this->request->getData();
53 53
 
54
-        $this->assertSame($this->purse,         $data['EPS_GUID']);
55
-        $this->assertSame($this->returnUrl,     $data['EPS_SUCCESS_URL']);
56
-        $this->assertSame($this->cancelUrl,     $data['EPS_FAIL_URL']);
57
-        $this->assertSame($this->notifyUrl,     $data['EPS_RESULT_URL']);
58
-        $this->assertSame($this->description,   $data['EPS_DESCRIPTION']);
59
-        $this->assertSame($this->amount,        $data['EPS_AMOUNT']);
54
+        $this->assertSame($this->purse, $data[ 'EPS_GUID' ]);
55
+        $this->assertSame($this->returnUrl, $data[ 'EPS_SUCCESS_URL' ]);
56
+        $this->assertSame($this->cancelUrl, $data[ 'EPS_FAIL_URL' ]);
57
+        $this->assertSame($this->notifyUrl, $data[ 'EPS_RESULT_URL' ]);
58
+        $this->assertSame($this->description, $data[ 'EPS_DESCRIPTION' ]);
59
+        $this->assertSame($this->amount, $data[ 'EPS_AMOUNT' ]);
60 60
     }
61 61
 
62 62
     public function testSendData()
Please login to merge, or discard this patch.
tests/unit/GatewayTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 
38 38
     public function testGateway()
39 39
     {
40
-        $this->assertSame($this->purse,     $this->gateway->getPurse());
41
-        $this->assertSame($this->secret,    $this->gateway->getSecret());
42
-        $this->assertSame($this->testMode,  $this->gateway->getTestMode());
40
+        $this->assertSame($this->purse, $this->gateway->getPurse());
41
+        $this->assertSame($this->secret, $this->gateway->getSecret());
42
+        $this->assertSame($this->testMode, $this->gateway->getTestMode());
43 43
     }
44 44
 
45 45
     public function testCompletePurchase()
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
             'transactionId' => $this->transactionId,
49 49
         ]);
50 50
 
51
-        $this->assertSame($this->purse,         $request->getPurse());
52
-        $this->assertSame($this->secret,        $request->getSecret());
53
-        $this->assertSame($this->testMode,      $request->getTestMode());
51
+        $this->assertSame($this->purse, $request->getPurse());
52
+        $this->assertSame($this->secret, $request->getSecret());
53
+        $this->assertSame($this->testMode, $request->getTestMode());
54 54
         $this->assertSame($this->transactionId, $request->getTransactionId());
55 55
     }
56 56
 
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
         ]);
65 65
 
66 66
         $this->assertSame($this->transactionId, $request->getTransactionId());
67
-        $this->assertSame($this->description,   $request->getDescription());
68
-        $this->assertSame($this->currency,      $request->getCurrency());
69
-        $this->assertSame($this->amount,        $request->getAmount());
67
+        $this->assertSame($this->description, $request->getDescription());
68
+        $this->assertSame($this->currency, $request->getCurrency());
69
+        $this->assertSame($this->amount, $request->getAmount());
70 70
     }
71 71
 }
Please login to merge, or discard this patch.
tests/unit/Message/CompletePurchaseRequestTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         parent::setUp();
33 33
 
34
-        $httpRequest = new HttpRequest([], [
34
+        $httpRequest = new HttpRequest([ ], [
35 35
             'check_key'         => $this->hash,
36 36
             'EPS_DESCRIPTION'   => $this->description,
37 37
             'EPS_GUID'          => $this->purse,
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $data = $this->request->getData();
56 56
 
57
-        $this->assertSame($this->description,   $data['EPS_DESCRIPTION']);
58
-        $this->assertSame($this->transactionId, $data['EPS_TRID']);
59
-        $this->assertSame($this->hash,          $data['check_key']);
60
-        $this->assertSame($this->amount,        $data['EPS_AMOUNT']);
61
-        $this->assertSame($this->purse,         $data['EPS_GUID']);
62
-        $this->assertSame($this->currency,      $data['EPS_CURRENCY']);
57
+        $this->assertSame($this->description, $data[ 'EPS_DESCRIPTION' ]);
58
+        $this->assertSame($this->transactionId, $data[ 'EPS_TRID' ]);
59
+        $this->assertSame($this->hash, $data[ 'check_key' ]);
60
+        $this->assertSame($this->amount, $data[ 'EPS_AMOUNT' ]);
61
+        $this->assertSame($this->purse, $data[ 'EPS_GUID' ]);
62
+        $this->assertSame($this->currency, $data[ 'EPS_CURRENCY' ]);
63 63
     }
64 64
 
65 65
     public function testSendData()
Please login to merge, or discard this patch.
tests/unit/Message/CompletePurchaseResponseTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
         ]);
65 65
 
66 66
         $this->assertTrue($response->isSuccessful());
67
-        $this->assertSame($this->transactionId,         $response->getTransactionId());
68
-        $this->assertSame($this->transactionReference,  $response->getTransactionReference());
69
-        $this->assertSame($this->amount,                $response->getAmount());
70
-        $this->assertSame($this->hash,                  $response->getHash());
71
-        $this->assertSame($this->currency,              $response->getCurrency());
67
+        $this->assertSame($this->transactionId, $response->getTransactionId());
68
+        $this->assertSame($this->transactionReference, $response->getTransactionReference());
69
+        $this->assertSame($this->amount, $response->getAmount());
70
+        $this->assertSame($this->hash, $response->getHash());
71
+        $this->assertSame($this->currency, $response->getCurrency());
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
src/Message/CompletePurchaseResponse.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,41 +31,41 @@
 block discarded – undo
31 31
 
32 32
     public function getHash()
33 33
     {
34
-        return strtolower($this->data['check_key']);
34
+        return strtolower($this->data[ 'check_key' ]);
35 35
     }
36 36
 
37 37
     public function calculateHash()
38 38
     {
39
-        return md5($this->data['EPS_AMOUNT'] . $this->data['EPS_GUID'] . $this->request->getSecret());
39
+        return md5($this->data[ 'EPS_AMOUNT' ].$this->data[ 'EPS_GUID' ].$this->request->getSecret());
40 40
     }
41 41
 
42 42
     public function isSuccessful()
43 43
     {
44
-        return $this->data['EPS_RESULT'] === 'done';
44
+        return $this->data[ 'EPS_RESULT' ] === 'done';
45 45
     }
46 46
 
47 47
     public function getTransactionId()
48 48
     {
49
-        return $this->data['EPS_TRID'];
49
+        return $this->data[ 'EPS_TRID' ];
50 50
     }
51 51
 
52 52
     public function getTransactionReference()
53 53
     {
54
-        return $this->data['EPS_ACCNUM'];
54
+        return $this->data[ 'EPS_ACCNUM' ];
55 55
     }
56 56
 
57 57
     public function getAmount()
58 58
     {
59
-        return $this->data['EPS_AMOUNT'];
59
+        return $this->data[ 'EPS_AMOUNT' ];
60 60
     }
61 61
 
62 62
     public function getTestMode()
63 63
     {
64
-        return (bool) $this->data['testMode'];
64
+        return (bool) $this->data[ 'testMode' ];
65 65
     }
66 66
 
67 67
     public function getCurrency()
68 68
     {
69
-        return $this->data['EPS_CURRENCY'];
69
+        return $this->data[ 'EPS_CURRENCY' ];
70 70
     }
71 71
 }
Please login to merge, or discard this patch.