Skip to content

Commit

Permalink
MAGETWO-69533: [BUGFIX][6244] Fix Issue with code label display in ca…
Browse files Browse the repository at this point in the history
…rt checkout. #9721

 - fixed code style issue
  • Loading branch information
Oleksii Korshenko committed May 29, 2017
1 parent c959d7e commit b344793
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/code/Magento/SalesRule/Plugin/CartTotalRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class CartTotalRepository
* @var \Magento\SalesRule\Model\Coupon
*/
private $coupon;

/**
* @var StoreManagerInterface
*/
Expand Down Expand Up @@ -55,6 +56,8 @@ public function __construct(
* @param \Magento\Quote\Model\Cart\CartTotalRepository $subject
* @param \Magento\Quote\Api\Data\TotalsInterface $result
* @return \Magento\Quote\Api\Data\TotalsInterface
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function afterGet(
\Magento\Quote\Model\Cart\CartTotalRepository $subject,
Expand Down Expand Up @@ -86,7 +89,6 @@ public function afterGet(

/* @var $label \Magento\SalesRule\Model\Data\RuleLabel */
foreach ($rule->getStoreLabels() as $label) {

if ($label->getStoreId() === 0) {
$storeLabelFallback = $label->getStoreLabel();
}
Expand All @@ -98,9 +100,7 @@ public function afterGet(
}

$extensionAttributes->setCouponLabel(($storeLabel) ? $storeLabel : $storeLabelFallback);

$result->setExtensionAttributes($extensionAttributes);

return $result;
}
}

0 comments on commit b344793

Please sign in to comment.