Passed
Push — master ( 69c27f...aa13d6 )
by Stavros
12:52
created
src/Config/Config.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
             ];
20 20
             $this->config = $this->loadConfigFile($paths);
21 21
 
22
-        }else{
22
+        } else{
23 23
 
24 24
             $this->config = $customConfig;
25 25
         }
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
@@ -31,7 +31,9 @@  discard block
 block discarded – undo
31 31
     public function getByTransaction($vivaTransaction)
32 32
     {
33 33
         // https://demo.vivapayments.com/api/transactions/:transaction_id
34
-        if (!$vivaTransaction)   throw new \Exception('Invalid transaction code');
34
+        if (!$vivaTransaction) {
35
+            throw new \Exception('Invalid transaction code');
36
+        }
35 37
         $config = $this->configObject;
36 38
         $url = $config->getEnvConfig('VIVA_URL');
37 39
         $curl = new CurlWrapper($url . '/api/transactions/' . $vivaTransaction);
@@ -63,7 +65,9 @@  discard block
 block discarded – undo
63 65
     public function getByTransactionV2($vivaTransaction)
64 66
     {
65 67
         // https://demo.vivapayments.com/checkout/v2/transactions/:transaction_id
66
-        if (!$vivaTransaction)   throw new \Exception('Invalid transaction code');
68
+        if (!$vivaTransaction) {
69
+            throw new \Exception('Invalid transaction code');
70
+        }
67 71
         $token = $this->accessToken->getToken();
68 72
         $config = $this->configObject;
69 73
         $url = $config->getEnvConfig('VIVA_API_URL') . '/checkout/v2/transactions/' . $vivaTransaction;
@@ -82,7 +86,9 @@  discard block
 block discarded – undo
82 86
     public function getByOrderCode($orderCode)
83 87
     {
84 88
         // https://demo.vivapayments.com/api/orders/:orderCode
85
-        if (!$orderCode)   throw new \Exception('Invalid transaction code');
89
+        if (!$orderCode) {
90
+            throw new \Exception('Invalid transaction code');
91
+        }
86 92
         $config = $this->configObject;
87 93
         $url = $config->getEnvConfig('VIVA_URL');
88 94
         $curl = new CurlWrapper($url . '/api/orders/' . $orderCode);
Please login to merge, or discard this patch.
src/Request/CreatePaymentOrder.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,9 @@
 block discarded – undo
159 159
             $params .= "&color=" . $config->getEnvConfig('VIVA_SMARTCHECKOUT_COLOR');
160 160
         }
161 161
 
162
-        if ($color) $params .= "&color=" . $color;
162
+        if ($color) {
163
+            $params .= "&color=" . $color;
164
+        }
163 165
 
164 166
 
165 167
         if ($lang instanceof RequestLang) {
Please login to merge, or discard this patch.