Passed
Push — master ( fac48b...8752e4 )
by Stavros
11:33
created
src/Services/CurlWrapper.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     private function execute() {
69 69
       
70 70
         //For debuging 
71
-       if ($this->getCurlDebugIsEnable()){
71
+        if ($this->getCurlDebugIsEnable()){
72 72
         $parentDir = dirname(dirname(dirname(__FILE__)));
73 73
         $fp = fopen($parentDir.'/debug_viva_curl.txt', 'w');
74 74
         curl_setopt($this->ch, CURLOPT_VERBOSE, 1);
Please login to merge, or discard this patch.
src/Traits/getConfigSettings.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 trait getConfigSettings
7 7
 {
8
-       public function getConfigSettings() {
8
+        public function getConfigSettings() {
9 9
         $environment = $this->accessToken->getEnvironment();
10 10
         $config = new Config($environment);
11 11
         return $config;
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
@@ -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.
src/Enums/WebhookEventType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         /**
57 57
          * Return value as string 
58 58
          * Enums\PaymentMethods::fromValue(15);
59
-        */
59
+         */
60 60
         
61 61
         public static function fromValue(int $value): string
62 62
         {
Please login to merge, or discard this patch.
src/Enums/RequestLang.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     /**
41 41
      * Return value as string 
42 42
      * Enums\RequestLang::fromValue('el-GR');
43
-    */
43
+     */
44 44
     
45 45
     public static function fromValue(string $value): string
46 46
     {
Please login to merge, or discard this patch.
src/Enums/TransactionType.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * Return value as string 
63 63
      * Enums\PaymentMethods::fromName('Dias');
64
-    */
64
+     */
65 65
 
66 66
 
67 67
 public static function fromName(string $name): int
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     /**
80 80
      * Return value as string 
81 81
      * Enums\PaymentMethods::fromValue(15);
82
-    */
82
+     */
83 83
     
84 84
     public static function fromValue(int $value): string
85 85
     {
Please login to merge, or discard this patch.
src/Transaction.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     
23 23
 
24 24
     public function process(){
25
-           echo 'Price =  '.$this->amount; 
25
+            echo 'Price =  '.$this->amount; 
26 26
 
27 27
     }
28 28
 
Please login to merge, or discard this patch.
src/Enums/PaymentMethods.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * Return value as string 
63 63
      * Enums\PaymentMethods::fromName('Dias');
64
-    */
64
+     */
65 65
 
66 66
 
67 67
 public static function fromName(string $name): int
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     /**
80 80
      * Return value as string 
81 81
      * Enums\PaymentMethods::fromValue(15);
82
-    */
82
+     */
83 83
     
84 84
     public static function fromValue(int $value): string
85 85
     {
Please login to merge, or discard this patch.