Passed
Push — main ( b1b5d7...536cb4 )
by
unknown
03:11
created
src/Message/AcceptNotification.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 use Omnipay\Common\Message\NotificationInterface;
9 9
 use Symfony\Component\HttpFoundation\Request as HttpRequest;
10 10
 
11
-class AcceptNotification extends PurchaseRequest implements NotificationInterface{
11
+class AcceptNotification extends PurchaseRequest implements NotificationInterface {
12 12
     protected $data;
13 13
 
14 14
     protected $transaction;
@@ -21,18 +21,18 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $sessionId = $this->httpRequest->query->get('sessionId') ?? $this->httpRequest->request->get('sessionId') ?? '';
23 23
 
24
-        if ( empty($sessionId) ) {
24
+        if (empty($sessionId)) {
25 25
             throw new InvalidRequestException('Session id is required');
26 26
         }
27 27
 
28 28
         $headers = [
29 29
             'Accept' => 'application/json',
30 30
             'Content-Type' => 'application/json',
31
-            'Authorization' => 'Basic ' . $this->getAuthorization()
31
+            'Authorization' => 'Basic '.$this->getAuthorization()
32 32
         ];
33 33
 
34 34
         try {
35
-            $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/' . $sessionId), $headers);
35
+            $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/'.$sessionId), $headers);
36 36
         } catch (\Exception $exception) {
37 37
             throw new InvalidRequestException($exception->getMessage());
38 38
         }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function getTransactionStatus()
59 59
     {
60
-        if ( $this->getTransaction() && $this->getAuthorised() && $this->getResponseText() === 'APPROVED' )  {
60
+        if ($this->getTransaction() && $this->getAuthorised() && $this->getResponseText() === 'APPROVED') {
61 61
             return static::STATUS_COMPLETED;
62 62
         }
63 63
 
Please login to merge, or discard this patch.
src/Message/PurchaseResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
 
24 24
     public function getRedirectUrl()
25 25
     {
26
-        foreach ( $this->data->links ?? [] as $link ) {
27
-            if ( $link->rel === 'hpp' ) {
26
+        foreach ($this->data->links ?? [] as $link) {
27
+            if ($link->rel === 'hpp') {
28 28
                 return $link->href;
29 29
             }
30 30
         }
Please login to merge, or discard this patch.