Skip to content

Commit

Permalink
fix(style): remove use of discouraged functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ricky committed Mar 20, 2024
1 parent dec9e1e commit 5b475a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Api/Model/Action/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ private function writeOrderXml(Order $order): self
$this->_xmlData .= "\t<Items>\n";
$this->_orderItem($order); //call to the order items function
//Get the order discounts
if ($this->_importDiscount && !is_null($order->getDiscountAmount()) && $order->getDiscountAmount() != '0.0000') {
if ($this->_importDiscount && $order->getDiscountAmount() !== NULL && $order->getDiscountAmount() != '0.0000') {
$this->_getOrderDiscounts($order);
}

Expand Down Expand Up @@ -349,7 +349,7 @@ private function _getGiftMessageInfo($messageContainer): self
$this->addXmlElement("GiftMessage", "<![CDATA[From: {$gift->getSender()}\nTo: {$gift->getRecipient()}\nMessage: {$gift->getMessage()}]]>");
}

$this->addXmlElement("Gift", !is_null($giftId) ? 'true' : 'false');
$this->addXmlElement("Gift", $giftId !== NULL ? 'true' : 'false');

return $this;
}
Expand All @@ -364,7 +364,7 @@ private function _getBillingInfo(Order $order): self
{
$billing = $order->getBillingAddress();

if (is_null($billing)) {
if ($billing === NULL) {
return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion Api/Model/Carrier/Shipping.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ protected function _getCartDetails($shippingRequest, $request)
'name' => $item->getname(),
'weight' => array('units' => $this->_scopeConfig->getValue('general/locale/weight_unit', $scopeTypeStore),
'value' => $item->getWeight()),
'price_per_item' => array( 'currency' =>$this->storeManager->getStore()->getCurrentCurrency()->getCode(), 'amount' => strval($item->getPrice())),
'price_per_item' => array( 'currency' =>$this->storeManager->getStore()->getCurrentCurrency()->getCode(), 'amount' => (string)$item->getPrice()),
'quantity' => $item->getQty(),
);
array_push($shippingRequest['items'], $shipstation_item);
Expand Down

0 comments on commit 5b475a7

Please sign in to comment.