Skip to content

Commit c717b34

Browse files
committed
#33334:Inheriting from a class that doesn't exist
- Removed unnecessary nesting in if statements according to the interface
1 parent a1575f7 commit c717b34

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,9 @@ public function getConfiguredAmount($baseValue = 0.)
150150
*/
151151
public function getValue()
152152
{
153-
if ($this->item) {
153+
if ($this->item && $this->item->getProduct()->getId()) {
154154
$configuredOptionsAmount = $this->getConfiguredAmount()->getBaseAmount();
155-
if (!empty($this->item->getProduct())) {
156-
return parent::getValue() + $this->discountCalculator->calculateDiscount($this->item->getProduct(), $configuredOptionsAmount);
157-
}
155+
return parent::getValue() + $this->discountCalculator->calculateDiscount($this->item->getProduct(), $configuredOptionsAmount);
158156
}
159157
return parent::getValue();
160158
}

0 commit comments

Comments
 (0)