Skip to content

Commit cabad42

Browse files
ENGCOM-5100: Removing 'if' block and making code more legible #22830
- Merge Pull Request #22830 from matheusgontijo/magento2:2.3-develop - Merged commits: 1. 76e0767
2 parents 02bca98 + 76e0767 commit cabad42

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)