Showing 11 of 11 total issues
Method send_message
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def send_message(from_user_id, target_id, channel_name, object_name, content, *args)
Method send_private_template_message
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def send_private_template_message(from_user_id, to_user_id, object_name, content, values, options = {})
Method send_system_template_message
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def send_system_template_message(from_user_id, to_user_id, object_name, content, values, options = {})
Method message_recall
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def message_recall(from_user_id, conversation_type, target_id, message_uid, sent_time)
Method send_system_message
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def send_system_message(from_user_id, to_user_id, object_name, content, options = {})
Method send_group_message
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def send_group_message(from_user_id, to_group_id, object_name, content, options = {})
Method send_private_message
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def send_private_message(from_user_id, to_user_id, object_name, content, options = {})
Method send_discussion_message
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def send_discussion_message(from_user_id, to_discussion_id, object_name, content, options = {})
Method send_chatroom_message
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def send_chatroom_message(from_user_id, to_chatroom_id, object_name, content, options = {})
Method send_message
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def send_message(from_user_id, target_id, channel_name, object_name, content, *args)
options = args.extract_options!
values = args.first
content_type = values.nil? ? :form_data : :json
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method inspect_debug_informations
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def inspect_debug_informations(*objects)
return unless RongCloud::Configuration.debug_mode
objects.each do |obj|
begin
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"