Passed
Push — master ( 9c89e0...7b907e )
by Florian
05:21 queued 11s
created
Model/Api/Invoice.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         if ($aPositions === false || $blFirstCapture === true || $blDebit === true) {
164 164
             $this->addShippingItem($oOrder, $aPositions, $blDebit, $dShippingCosts); // add shipping invoice params to request
165 165
             $this->addDiscountItem($oOrder, $aPositions, $blDebit); // add discount invoice params to request
166
-            $this->addGiftCardItem($oOrder);  // add gift card invoice params to request
166
+            $this->addGiftCardItem($oOrder); // add gift card invoice params to request
167 167
             $this->addAmastyGiftcards($oOrder, $aPositions, $blDebit); // add amasty giftcard invoice params to request
168 168
         }
169 169
         return $this->dAmount;
@@ -203,11 +203,11 @@  discard block
 block discarded – undo
203 203
     {
204 204
         $giftCards = json_decode($oOrder->getData('gift_cards'), true);
205 205
 
206
-        if(empty($giftCards) || !is_array($giftCards)) {
206
+        if (empty($giftCards) || !is_array($giftCards)) {
207 207
             return;
208 208
         }
209 209
 
210
-        foreach($giftCards as $giftCard) {
210
+        foreach ($giftCards as $giftCard) {
211 211
             $giftCardAmount = $this->getGiftCardAmount($giftCard);
212 212
             $this->addInvoicePosition($giftCard['c'], $giftCardAmount, 'voucher', 1, 'Giftcard', 0);
213 213
         }
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
     {
371 371
         if (fmod(floatval($dItemAmount), 1.0) > 0) { // input does not represent an integer
372 372
             $sErrorMessage = "Unable to use floating point values for item amounts! Parameter was: ";
373
-            throw new \InvalidArgumentException($sErrorMessage . strval($dItemAmount), 1);
373
+            throw new \InvalidArgumentException($sErrorMessage.strval($dItemAmount), 1);
374 374
         } else { // return the integer value
375 375
             return intval($dItemAmount);
376 376
         }
Please login to merge, or discard this patch.