Martin91/rong_cloud

View on GitHub

Showing 11 of 11 total issues

Method send_message has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

      def send_message(from_user_id, target_id, channel_name, object_name, content, *args)
Severity: Minor
Found in lib/rong_cloud/services/message.rb - About 45 mins to fix

    Method send_private_template_message has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

          def send_private_template_message(from_user_id, to_user_id, object_name, content, values, options = {})
    Severity: Minor
    Found in lib/rong_cloud/services/message.rb - About 45 mins to fix

      Method send_system_template_message has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def send_system_template_message(from_user_id, to_user_id, object_name, content, values, options = {})
      Severity: Minor
      Found in lib/rong_cloud/services/message.rb - About 45 mins to fix

        Method message_recall has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              def message_recall(from_user_id, conversation_type, target_id, message_uid, sent_time)
        Severity: Minor
        Found in lib/rong_cloud/services/message_recall.rb - About 35 mins to fix

          Method send_system_message has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                def send_system_message(from_user_id, to_user_id, object_name, content, options = {})
          Severity: Minor
          Found in lib/rong_cloud/services/message.rb - About 35 mins to fix

            Method send_group_message has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  def send_group_message(from_user_id, to_group_id, object_name, content, options = {})
            Severity: Minor
            Found in lib/rong_cloud/services/message.rb - About 35 mins to fix

              Method send_private_message has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    def send_private_message(from_user_id, to_user_id, object_name, content, options = {})
              Severity: Minor
              Found in lib/rong_cloud/services/message.rb - About 35 mins to fix

                Method send_discussion_message has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      def send_discussion_message(from_user_id, to_discussion_id, object_name, content, options = {})
                Severity: Minor
                Found in lib/rong_cloud/services/message.rb - About 35 mins to fix

                  Method send_chatroom_message has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        def send_chatroom_message(from_user_id, to_chatroom_id, object_name, content, options = {})
                  Severity: Minor
                  Found in lib/rong_cloud/services/message.rb - About 35 mins to fix

                    Method send_message has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    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
                    
                    
                    Severity: Minor
                    Found in lib/rong_cloud/services/message.rb - About 25 mins to fix

                    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

                        def inspect_debug_informations(*objects)
                          return unless RongCloud::Configuration.debug_mode
                    
                          objects.each do |obj|
                            begin
                    Severity: Minor
                    Found in lib/rong_cloud/request.rb - About 25 mins to fix

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language