Skip to content

Commit b740231

Browse files
authored
ENGCOM-5825: Refactor isSubscribed method to return the output of the expression #24534
2 parents 99a43aa + c472b8c commit b740231

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/code/Magento/Newsletter/Model/Subscriber.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,7 @@ public function isStatusChanged()
353353
*/
354354
public function isSubscribed()
355355
{
356-
if ($this->getId() && $this->getStatus() == self::STATUS_SUBSCRIBED) {
357-
return true;
358-
}
359-
360-
return false;
356+
return $this->getId() && (int)$this->getStatus() === self::STATUS_SUBSCRIBED;
361357
}
362358

363359
/**

0 commit comments

Comments
 (0)