Passed
Push — master ( 04ba37...72f39a )
by Florian
02:51
created
Helper/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@
 block discarded – undo
278 278
     public function getOldAddressStatus(AddressInterface $oAddress, $blIsCreditrating = true)
279 279
     {
280 280
         $sStatus = $this->getStatusFromPreviousQuoteAddress($oAddress, $blIsCreditrating);
281
-        if(empty($sStatus) && $blIsCreditrating === true && $this->getConfigParam('integration_event', 'creditrating', 'payone_protect') == 'after_payment') {
281
+        if (empty($sStatus) && $blIsCreditrating === true && $this->getConfigParam('integration_event', 'creditrating', 'payone_protect') == 'after_payment') {
282 282
             $sStatus = $this->getScoreFromCheckedAddresses($oAddress);
283 283
         }
284 284
         return $sStatus;
Please login to merge, or discard this patch.
Observer/Transactionstatus/Appointed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
         }
128 128
 
129 129
         // preauthorization-orders and advance payment should not create an invoice
130
-        if ($oOrder->getPayoneAuthmode() !== 'authorization' || $oOrder->getPayment()->getMethodInstance()->getCode() === PayoneConfig::METHOD_ADVANCE_PAYMENT){
130
+        if ($oOrder->getPayoneAuthmode() !== 'authorization' || $oOrder->getPayment()->getMethodInstance()->getCode() === PayoneConfig::METHOD_ADVANCE_PAYMENT) {
131 131
             return;
132 132
         }
133 133
 
Please login to merge, or discard this patch.
Model/Source/CreditcardTypes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@
 block discarded – undo
39 39
      * @var array
40 40
      */
41 41
     protected static $aTypes = [
42
-        'visa'              => array('name' => 'Visa',                  'cardtype' => 'V', 'cvc_length' => 3),
43
-        'mastercard'        => array('name' => 'Mastercard',            'cardtype' => 'M', 'cvc_length' => 3),
44
-        'americanexpress'   => array('name' => 'American Express',      'cardtype' => 'A', 'cvc_length' => 4),
45
-        'dinersclub'        => array('name' => 'Diners Club',           'cardtype' => 'D', 'cvc_length' => 3),
46
-        'jcb'               => array('name' => 'JCB',                   'cardtype' => 'J', 'cvc_length' => 3),
42
+        'visa'              => array('name' => 'Visa', 'cardtype' => 'V', 'cvc_length' => 3),
43
+        'mastercard'        => array('name' => 'Mastercard', 'cardtype' => 'M', 'cvc_length' => 3),
44
+        'americanexpress'   => array('name' => 'American Express', 'cardtype' => 'A', 'cvc_length' => 4),
45
+        'dinersclub'        => array('name' => 'Diners Club', 'cardtype' => 'D', 'cvc_length' => 3),
46
+        'jcb'               => array('name' => 'JCB', 'cardtype' => 'J', 'cvc_length' => 3),
47 47
         'maestroint'        => array('name' => 'Maestro International', 'cardtype' => 'O', 'cvc_length' => 3),
48
-        'cartebleue'        => array('name' => 'Carte Bleue',           'cardtype' => 'B', 'cvc_length' => 3),
48
+        'cartebleue'        => array('name' => 'Carte Bleue', 'cardtype' => 'B', 'cvc_length' => 3),
49 49
     ];
50 50
 
51 51
     /**
Please login to merge, or discard this patch.
Model/Plugins/MethodList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     protected function removeBannedPaymentMethods($aPaymentMethods, Quote $oQuote)
206 206
     {
207 207
         $aBannedMethos = $this->getBannedPaymentMethods($oQuote);
208
-        for($i = 0; $i < count($aPaymentMethods); $i++) {
208
+        for ($i = 0; $i < count($aPaymentMethods); $i++) {
209 209
             $sCode = $aPaymentMethods[$i]->getCode();
210 210
             if (array_key_exists($sCode, $aBannedMethos) !== false) {
211 211
                 $iBannedUntil = strtotime($aBannedMethos[$sCode]);
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         $aWhitelist = $this->checkoutSession->getPayonePaymentWhitelist();
229 229
         if (!empty($aWhitelist)) {
230 230
             $iCount = count($aPaymentMethods);
231
-            for($i = 0; $i < $iCount; $i++) {
231
+            for ($i = 0; $i < $iCount; $i++) {
232 232
                 if (array_search($aPaymentMethods[$i]->getCode(), $aWhitelist) === false) {
233 233
                     unset($aPaymentMethods[$i]);
234 234
                 }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      */
246 246
     public function removeAmazonPay($aPaymentMethods)
247 247
     {
248
-        for($i = 0; $i < count($aPaymentMethods); $i++) {
248
+        for ($i = 0; $i < count($aPaymentMethods); $i++) {
249 249
             if (isset($aPaymentMethods[$i]) && $aPaymentMethods[$i]->getCode() == PayoneConfig::METHOD_AMAZONPAY) {
250 250
                 unset($aPaymentMethods[$i]);
251 251
             }
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
             PayoneConfig::METHOD_KLARNA_DEBIT,
269 269
             PayoneConfig::METHOD_KLARNA_INSTALLMENT
270 270
         ];
271
-        for($i = 0; $i < count($aPaymentMethods); $i++) {
271
+        for ($i = 0; $i < count($aPaymentMethods); $i++) {
272 272
             if (isset($aPaymentMethods[$i])) {
273 273
                 if ($aPaymentMethods[$i]->getCode() == PayoneConfig::METHOD_KLARNA_BASE) {
274 274
                     $iKeyKlarna = $i;
Please login to merge, or discard this patch.
Service/V1/KlarnaHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
                 if ($aResponse['status'] == 'OK') {
110 110
                     $oResponse->setData('clientToken', $aResponse['add_paydata[client_token]']);
111 111
                     $blSuccess = true;
112
-                } elseif($aResponse['status'] == 'ERROR') {
112
+                } elseif ($aResponse['status'] == 'ERROR') {
113 113
                     if ($aResponse['errorcode'] == '981') {
114 114
                         $oResponse->setData('errormessage', __('Payment method is not available anymore'));
115 115
                     } else {
Please login to merge, or discard this patch.
Model/Api/Invoice.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         if ($aPositions === false || $blFirstCapture === true || $blDebit === true) {
156 156
             $this->addShippingItem($oOrder, $aPositions, $blDebit, $dShippingCosts); // add shipping invoice params to request
157 157
             $this->addDiscountItem($oOrder, $aPositions, $blDebit); // add discount invoice params to request
158
-            $this->addGiftCardItem($oOrder);  // add gift card invoice params to request
158
+            $this->addGiftCardItem($oOrder); // add gift card invoice params to request
159 159
             $this->addAmastyGiftcards($oOrder, $aPositions, $blDebit); // add amasty giftcard invoice params to request
160 160
         }
161 161
         return $this->dAmount;
@@ -195,11 +195,11 @@  discard block
 block discarded – undo
195 195
     {
196 196
         $giftCards = json_decode($oOrder->getData('gift_cards'), true);
197 197
 
198
-        if(empty($giftCards) || !is_array($giftCards)) {
198
+        if (empty($giftCards) || !is_array($giftCards)) {
199 199
             return;
200 200
         }
201 201
 
202
-        foreach($giftCards as $giftCard) {
202
+        foreach ($giftCards as $giftCard) {
203 203
             $this->addInvoicePosition($giftCard['c'], -$giftCard['authorized'], 'voucher', 1, 'Giftcard', 0);
204 204
         }
205 205
     }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     {
343 343
         if (fmod(floatval($dItemAmount), 1.0) > 0) { // input does not represent an integer
344 344
             $sErrorMessage = "Unable to use floating point values for item amounts! Parameter was: ";
345
-            throw new \InvalidArgumentException($sErrorMessage . strval($dItemAmount), 1);
345
+            throw new \InvalidArgumentException($sErrorMessage.strval($dItemAmount), 1);
346 346
         } else { // return the integer value
347 347
             return intval($dItemAmount);
348 348
         }
Please login to merge, or discard this patch.