app/models/concerns/feed/comment.rb
Showing 3 of 3 total issues
Method new_comment_notifications
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
Open
def new_comment_notifications return if automatic? if issue_comment? commentable.subscribes.each do |subscribe|
- Read upRead up
Method new_comment_notifications
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def new_comment_notifications return if automatic? if issue_comment? commentable.subscribes.each do |subscribe|
Consider simplifying this complex logical expression. Open
Open
if subscribe.user.notifier.can_notify && !own_comment?(subscribe.user) ( (subscribe.project.owner?(subscribe.user) && subscribe.user.notifier.new_comment_commit_repo_owner) || (subscribe.user.commentor?(self.commentable) && subscribe.user.notifier.new_comment_commit_commentor) || (subscribe.user.committer?(self.commentable) && subscribe.user.notifier.new_comment_commit_owner) ) UserMailer.new_comment_notification(self, subscribe.user_id).deliver