Skip to content

Commit

Permalink
code sniffer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mavlyan committed Nov 8, 2017
1 parent 68d3a9f commit 95b8a5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Helper/Data.php
Expand Up @@ -197,13 +197,13 @@ public function getCode()
public function getAttributeValue($attributeCode, $productId)
{
$product = $this->getProduct($productId);
$value = !is_null($product->getAttributeText($attributeCode)) ?
$product->getAttributeText($attributeCode) :
$product->getData($attributeCode);
$value = $product->getAttributeText($attributeCode) !== null
? $product->getAttributeText($attributeCode)
: $product->getData($attributeCode);

return $value;
}

/**
* Retrieve url
*
Expand Down
4 changes: 3 additions & 1 deletion Helper/Discount.php
Expand Up @@ -189,7 +189,9 @@ public function buildFinalArray()
$taxValue = $this->_taxAttributeCode
? $this->addTaxValue($this->_taxAttributeCode, $item)
: $this->_taxValue;
$price = !is_null($item->getData(self::NAME_UNIT_PRICE)) ? $item->getData(self::NAME_UNIT_PRICE) : $item->getData('price_incl_tax');
$price = $item->getData(self::NAME_UNIT_PRICE) !== null
? $item->getData(self::NAME_UNIT_PRICE)
: $item->getData('price_incl_tax');
$entityItem = $this->_buildItem($item, $price, $taxValue);

$itemsFinal[$item->getId()] = $entityItem;
Expand Down

0 comments on commit 95b8a5a

Please sign in to comment.