Passed
Push — master ( fac48b...8752e4 )
by Stavros
11:33
created
src/Request/CreatePaymentOrder.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,9 @@
 block discarded – undo
149 149
             $params .= "&color=" . $this->getConfigSettings()->getEnvConfig('VIVA_SMARTCHECKOUT_COLOR');
150 150
         }
151 151
 
152
-        if ($color) $params .= "&color=" . $color;
152
+        if ($color) {
153
+            $params .= "&color=" . $color;
154
+        }
153 155
 
154 156
 
155 157
         if ($lang instanceof RequestLang) {
Please login to merge, or discard this patch.
src/Request/Transaction.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@  discard block
 block discarded – undo
30 30
     public function getByTransaction($vivaTransaction)
31 31
     {
32 32
         // https://demo.vivapayments.com/api/transactions/:transaction_id
33
-        if (!$vivaTransaction)   throw new \Exception('Invalid transaction code');
33
+        if (!$vivaTransaction) {
34
+            throw new \Exception('Invalid transaction code');
35
+        }
34 36
         $url = $this->getConfigSettings()->getEnvConfig('VIVA_URL');
35 37
         $curl = new CurlWrapper($url . '/api/transactions/' . $vivaTransaction);
36 38
         $curl->addHeader('Content-Type: application/json');
@@ -61,7 +63,9 @@  discard block
 block discarded – undo
61 63
     public function getByTransactionV2($vivaTransaction)
62 64
     {
63 65
         // https://demo.vivapayments.com/checkout/v2/transactions/:transaction_id
64
-        if (!$vivaTransaction)   throw new \Exception('Invalid transaction code');
66
+        if (!$vivaTransaction) {
67
+            throw new \Exception('Invalid transaction code');
68
+        }
65 69
         $token = $this->accessToken->getToken();
66 70
         $url = $this->getConfigSettings()->getEnvConfig('VIVA_API_URL') . '/checkout/v2/transactions/' . $vivaTransaction;
67 71
         $curl = new CurlWrapper($url);
@@ -79,7 +83,9 @@  discard block
 block discarded – undo
79 83
     public function getByOrderCode($orderCode)
80 84
     {
81 85
         // https://demo.vivapayments.com/api/orders/:orderCode
82
-        if (!$orderCode)   throw new \Exception('Invalid transaction code');
86
+        if (!$orderCode) {
87
+            throw new \Exception('Invalid transaction code');
88
+        }
83 89
         $url = $this->getConfigSettings()->getEnvConfig('VIVA_URL');
84 90
         $curl = new CurlWrapper($url . '/api/orders/' . $orderCode);
85 91
         $curl->addHeader('Content-Type: application/json');
Please login to merge, or discard this patch.