cre-ne-jp/log-archiver

View on GitHub
app/models/message_period.rb

Summary

Maintainability
A
35 mins
Test Coverage

Showing 2 of 2 total issues

Method has too many lines. [44/30]
Open

def result
return nil unless valid?
 
channels = @channels.empty? ?
[] : Channel.where(identifier: @channels.split).to_a
Severity: Minor
Found in app/models/message_period.rb by rubocop

Method unite_broadcast_messages has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def unite_broadcast_messages(messages)
# 種類ごとに最後のメッセージを記録するためのハッシュ
last = {}
 
united_messages = messages.map do |m|
Severity: Minor
Found in app/models/message_period.rb - About 35 mins to fix

There are no issues that match your filters.

Category
Status