Completed
Push — master ( 313734...5ac38b )
by Mario
03:33
created
Controllers/Frontend/PaymentKlarna.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
         }
113 113
         
114 114
         if ($this->Request()->getPost('sCountry')) {
115
-            $this->session['sCountry'] = (int)$this->Request()->getPost('sCountry');
115
+            $this->session['sCountry'] = (int) $this->Request()->getPost('sCountry');
116 116
             $this->session["sState"] = 0;
117 117
             $this->session["sArea"] = Shopware()->Db()->fetchOne("
118 118
                 SELECT areaID FROM s_core_countries WHERE id = ?
119 119
             ", [$this->session['sCountry']]);
120 120
             unset($this->session->KlarnaOrder);
121
-            $this->session['sChangedCountry'] = (int)$this->Request()->getPost('sCountry');
121
+            $this->session['sChangedCountry'] = (int) $this->Request()->getPost('sCountry');
122 122
         }
123 123
         $this->forward('index');
124 124
     }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                     $this->redirect(['controller' => 'payment_klarna', 'action' => 'otherPayment']);
160 160
                     return;
161 161
                 }
162
-                $shopCountryId = (string)$shopCountryId;
162
+                $shopCountryId = (string) $shopCountryId;
163 163
                 if ($shopCountryId != $postedCountry) {
164 164
                     $this->session['sCountry'] = $postedCountry;
165 165
                     // unset klarnaOrder so it will be created with new countryID
@@ -314,10 +314,10 @@  discard block
 block discarded – undo
314 314
 
315 315
         $this->basket['sAmountTax'] = 1.9;
316 316
         $this->View()->sShippingcosts = $debugShipping['brutto'];
317
-        $this->View()->sShippingcostsWithTax =  $debugShipping['brutto'];
317
+        $this->View()->sShippingcostsWithTax = $debugShipping['brutto'];
318 318
         $this->View()->sShippingcostsNet = $debugShipping['netto'];
319 319
         $this->View()->sShippingcostsTax = $debugShipping['tax'];
320
-        $this->View()->sAmount = $this->basket['AmountWithTaxNumeric'] ;
320
+        $this->View()->sAmount = $this->basket['AmountWithTaxNumeric'];
321 321
 
322 322
         $this->View()->sAmountNet = $this->basket['sAmountNet'];
323 323
         $this->View()->sAmountTax = $this->basket['sAmountTax'];
@@ -804,11 +804,11 @@  discard block
 block discarded – undo
804 804
                     }
805 805
                 } catch (\Exception $ex) {
806 806
                     $this->plugin->klarnaLog(
807
-                        "ERROR while creating User. Exception information: ". $ex->getMessage(),
807
+                        "ERROR while creating User. Exception information: " . $ex->getMessage(),
808 808
                         1
809 809
                     );
810 810
                     $this->plugin->klarnaLog(
811
-                        "ERROR while creating User. Exception backtrace: \n". $ex->getTraceAsString(),
811
+                        "ERROR while creating User. Exception backtrace: \n" . $ex->getTraceAsString(),
812 812
                         1
813 813
                     );
814 814
                     if ($ex instanceof \Shopware\Components\Api\Exception\ValidationException) {
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
                             $details[] = $violation->__toString();
822 822
                         }
823 823
                         $this->plugin->klarnaLog(
824
-                            "ERROR while creating User. Validation exception details: \n". implode("\n", $details),
824
+                            "ERROR while creating User. Validation exception details: \n" . implode("\n", $details),
825 825
                             1
826 826
                         );
827 827
                     }
@@ -1080,8 +1080,8 @@  discard block
 block discarded – undo
1080 1080
 
1081 1081
                 $update['status'] = 'created';
1082 1082
                 $update['merchant_reference'] = [
1083
-                    'orderid1' => (string)$orderNumber,
1084
-                    'orderid2' => (string)$order['reference']
1083
+                    'orderid1' => (string) $orderNumber,
1084
+                    'orderid2' => (string) $order['reference']
1085 1085
                 ];
1086 1086
                 $order->update($update);
1087 1087
             }
@@ -1410,8 +1410,8 @@  discard block
 block discarded – undo
1410 1410
 
1411 1411
             $update['status'] = 'created';
1412 1412
             $update['merchant_reference'] = [
1413
-                'orderid1' => (string)$orderNumber,
1414
-                'orderid2' => (string)$order['reference']
1413
+                'orderid1' => (string) $orderNumber,
1414
+                'orderid2' => (string) $order['reference']
1415 1415
             ];
1416 1416
             $order->update($update);
1417 1417
         }
Please login to merge, or discard this patch.