Passed
Push — main ( 5320a7...b58d22 )
by Dan
10:42
created
src/Message/PurchaseRequest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         $headers = [
215 215
             'Accept' => 'application/json',
216 216
             'Content-Type' => 'application/json',
217
-            'Authorization' => 'Basic ' . $this->getAuthorization()
217
+            'Authorization' => 'Basic '.$this->getAuthorization()
218 218
         ];
219 219
 
220 220
         $httpResponse = $this->httpClient->request('POST', $this->getEndpoint('sessions'), $headers, json_encode($data));
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      * @return string
239 239
      */
240 240
     protected function getEndpoint($path = '') {
241
-        return ($this->getTestMode() ? self::endpointTest : self::endpointLive) . '/' . $path;
241
+        return ($this->getTestMode() ? self::endpointTest : self::endpointLive).'/'.$path;
242 242
     }
243 243
 
244 244
     protected function getAuthorization() {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -221,8 +221,7 @@
 block discarded – undo
221 221
 
222 222
         try {
223 223
             $responseData = json_decode($httpResponse->getBody()->getContents());
224
-        }
225
-        catch (\Exception $exception) {
224
+        } catch (\Exception $exception) {
226 225
             $responseData = [];
227 226
         }
228 227
 
Please login to merge, or discard this patch.
src/Message/CompletePurchaseRequest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
         $headers = [
24 24
             'Accept' => 'application/json',
25 25
             'Content-Type' => 'application/json',
26
-            'Authorization' => 'Basic ' . $this->getAuthorization()
26
+            'Authorization' => 'Basic '.$this->getAuthorization()
27 27
         ];
28 28
 
29 29
         try {
30
-            $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/' . $sessionId), $headers);
30
+            $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/'.$sessionId), $headers);
31 31
         }
32 32
         catch (\Exception $exception) {
33 33
             throw new InvalidRequestException($exception->getMessage());
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 
29 29
         try {
30 30
             $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/' . $sessionId), $headers);
31
-        }
32
-        catch (\Exception $exception) {
31
+        } catch (\Exception $exception) {
33 32
             throw new InvalidRequestException($exception->getMessage());
34 33
         }
35 34
 
Please login to merge, or discard this patch.
src/Message/AcceptNotification.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
         $headers = [
28 28
             'Accept' => 'application/json',
29 29
             'Content-Type' => 'application/json',
30
-            'Authorization' => 'Basic ' . $this->getAuthorization()
30
+            'Authorization' => 'Basic '.$this->getAuthorization()
31 31
         ];
32 32
 
33 33
         try {
34
-            $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/' . $sessionId), $headers);
34
+            $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/'.$sessionId), $headers);
35 35
         }
36 36
         catch (\Exception $exception) {
37 37
             throw new InvalidRequestException($exception->getMessage());
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     }
55 55
 
56 56
     public function getTransactionStatus() {
57
-        if ($this->getTransaction() && $this->getAuthorised() && $this->getResponseText() === 'APPROVED')  {
57
+        if ($this->getTransaction() && $this->getAuthorised() && $this->getResponseText() === 'APPROVED') {
58 58
             return static::STATUS_COMPLETED;
59 59
         }
60 60
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
 
33 33
         try {
34 34
             $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/' . $sessionId), $headers);
35
-        }
36
-        catch (\Exception $exception) {
35
+        } catch (\Exception $exception) {
37 36
             throw new InvalidRequestException($exception->getMessage());
38 37
         }
39 38
 
Please login to merge, or discard this patch.
src/Message/CompletePurchaseResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
     }
76 76
 
77 77
     public function getCardExpiry() {
78
-        return ($this->getCard()['dateExpiryMonth'] ?? '') . '/' . ($this->getCard()['dateExpiryYear'] ?? '');
78
+        return ($this->getCard()['dateExpiryMonth'] ?? '').'/'.($this->getCard()['dateExpiryYear'] ?? '');
79 79
     }
80 80
 
81 81
     public function getCardType() {
Please login to merge, or discard this patch.
src/Message/PurchaseResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     }
21 21
 
22 22
     public function getRedirectUrl() {
23
-        foreach ( $this->data->links ?? [] as $link ) {
23
+        foreach ($this->data->links ?? [] as $link) {
24 24
             if ($link->rel === 'hpp') {
25 25
                 return $link->href;
26 26
             }
Please login to merge, or discard this patch.