Skip to content

Commit c9cf2cf

Browse files
authored
ENGCOM-5100: Removing "if" block and making code more legible #22830
2 parents 363ee27 + cabad42 commit c9cf2cf

File tree

1 file changed

+6
-6
lines changed
  • app/code/Magento/Wishlist/Helper

1 file changed

+6
-6
lines changed

app/code/Magento/Wishlist/Helper/Data.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,14 +490,14 @@ public function getListUrl($wishlistId = null)
490490
*/
491491
public function isAllow()
492492
{
493-
if ($this->_moduleManager->isOutputEnabled($this->_getModuleName()) && $this->scopeConfig->getValue(
493+
$isOutputEnabled = $this->_moduleManager->isOutputEnabled($this->_getModuleName());
494+
495+
$isWishlistActive = $this->scopeConfig->getValue(
494496
'wishlist/general/active',
495497
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
496-
)
497-
) {
498-
return true;
499-
}
500-
return false;
498+
);
499+
500+
return $isOutputEnabled && $isWishlistActive;
501501
}
502502

503503
/**

0 commit comments

Comments
 (0)