Completed
Push — master ( 138e29...323acf )
by Mario
03:13
created
Controllers/Frontend/PaymentKlarna.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function showIframeAction()
131 131
     {
132 132
         $this->basket = $this->get('modules')->Basket()->sGetBasket();
133
-         $preFill = $this->config['preFillCheckout'];
133
+            $preFill = $this->config['preFillCheckout'];
134 134
         if ($this->isUserLoggedIn()) {
135 135
             $user = Shopware()->Modules()->Admin()->sGetUserData();
136 136
         }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
         // Klarna Prefill checkBox
291 291
         if ($this->isUserLoggedIn()) {
292
-               $this->View()->assign('KlarnaPreFillSelect', !$this->session['klarnaPreFill']);
292
+                $this->View()->assign('KlarnaPreFillSelect', !$this->session['klarnaPreFill']);
293 293
         }
294 294
 
295 295
         // Iframe Backend Config
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
             $plainbilling['birthday'] = null;
874 874
         } else {
875 875
             $plainbilling['birthday'] = new \DateTime(
876
-               $plainbilling['birthyear'] . '-' .
876
+                $plainbilling['birthyear'] . '-' .
877 877
                     $plainbilling['birthmonth'] . '-' .
878 878
                     $plainbilling['birthday']);
879 879
         }
@@ -944,12 +944,12 @@  discard block
 block discarded – undo
944 944
     }
945 945
 
946 946
 
947
-     /**
948
-     * Updates the shipping address
949
-     *
950
-     * @param int $userId
951
-     * @param array $shippingData
952
-     */
947
+        /**
948
+         * Updates the shipping address
949
+         *
950
+         * @param int $userId
951
+         * @param array $shippingData
952
+         */
953 953
     private function updateShipping($userId, $shippingData)
954 954
     {
955 955
         /** @var \Shopware\Components\Model\ModelManager $em */
@@ -962,7 +962,7 @@  discard block
 block discarded – undo
962 962
         $addressBefore = $customer->getDefaultShippingAddress();
963 963
         $address = new \Shopware\Models\Customer\Address();
964 964
         
965
-         /** @var \Shopware\Models\Country\Country $country */
965
+            /** @var \Shopware\Models\Country\Country $country */
966 966
         $country = $addressBefore->getCountry();
967 967
         $shippingData['country'] = $country;
968 968
         if ($shippingData['phone'] === null) {
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
         /** @var \Shopware\Models\Customer\Address $address */
1027 1027
         $address = $customer->getDefaultBillingAddress();
1028 1028
         
1029
-         /** @var \Shopware\Models\Country\Country $country */
1029
+            /** @var \Shopware\Models\Country\Country $country */
1030 1030
         $country = $address->getCountry();
1031 1031
         $billingData['country'] = $country;
1032 1032
         $address->fromArray($billingData);
@@ -1602,7 +1602,7 @@  discard block
 block discarded – undo
1602 1602
      */
1603 1603
     protected function isUserLoggedIn()
1604 1604
     {
1605
-         return (isset($this->session->sUserId) && !empty($this->session->sUserId));
1605
+            return (isset($this->session->sUserId) && !empty($this->session->sUserId));
1606 1606
     }
1607 1607
 
1608 1608
     /**
Please login to merge, or discard this 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'];
@@ -822,11 +822,11 @@  discard block
 block discarded – undo
822 822
                     }
823 823
                 } catch (\Exception $ex) {
824 824
                     $this->plugin->klarnaLog(
825
-                        "ERROR while creating User. Exception information: ". $ex->getMessage(),
825
+                        "ERROR while creating User. Exception information: " . $ex->getMessage(),
826 826
                         1
827 827
                     );
828 828
                     $this->plugin->klarnaLog(
829
-                        "ERROR while creating User. Exception backtrace: \n". $ex->getTraceAsString(),
829
+                        "ERROR while creating User. Exception backtrace: \n" . $ex->getTraceAsString(),
830 830
                         1
831 831
                     );
832 832
                     if ($ex instanceof \Shopware\Components\Api\Exception\ValidationException) {
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
                             $details[] = $violation->__toString();
840 840
                         }
841 841
                         $this->plugin->klarnaLog(
842
-                            "ERROR while creating User. Validation exception details: \n". implode("\n", $details),
842
+                            "ERROR while creating User. Validation exception details: \n" . implode("\n", $details),
843 843
                             1
844 844
                         );
845 845
                     }
@@ -1126,8 +1126,8 @@  discard block
 block discarded – undo
1126 1126
 
1127 1127
                 $update['status'] = 'created';
1128 1128
                 $update['merchant_reference'] = [
1129
-                    'orderid1' => (string)$orderNumber,
1130
-                    'orderid2' => (string)$order['reference'],
1129
+                    'orderid1' => (string) $orderNumber,
1130
+                    'orderid2' => (string) $order['reference'],
1131 1131
                 ];
1132 1132
                 $order->update($update);
1133 1133
             }
@@ -1456,8 +1456,8 @@  discard block
 block discarded – undo
1456 1456
 
1457 1457
             $update['status'] = 'created';
1458 1458
             $update['merchant_reference'] = [
1459
-                'orderid1' => (string)$orderNumber,
1460
-                'orderid2' => (string)$order['reference'],
1459
+                'orderid1' => (string) $orderNumber,
1460
+                'orderid2' => (string) $order['reference'],
1461 1461
             ];
1462 1462
             $order->update($update);
1463 1463
         }
Please login to merge, or discard this patch.