tansaku/LocalSupport

View on GitHub
app/services/create_proposed_organisation_edit.rb

Summary

Maintainability
A
1 hr
Test Coverage

Method has too many lines. [7/5] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def initialize(listener, params, model_klass, user_klass, mailer_klass)
    @listener = listener
    @params = params
    @organisation = params[:organisation]
    @editor = params[:editor]

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method has too many lines. [6/5] (https://github.com/bbatsov/ruby-style-guide#short-methods)
Open

  def run
    unless editor.siteadmin?
      merge_in_non_published_fields
      send_email_to_superadmin_about_org_edit
      listener.set_notice('Edit is pending admin approval.')

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

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

  def initialize(listener, params, model_klass, user_klass, mailer_klass)
Severity: Minor
Found in app/services/create_proposed_organisation_edit.rb - About 35 mins to fix

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

      def self.with(listener, params, model_klass = ProposedOrganisationEdit, user_klass = User, mailer_klass = AdminMailer)
    Severity: Minor
    Found in app/services/create_proposed_organisation_edit.rb - About 35 mins to fix

      Line is too long. [120/90] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
      Open

        def self.with(listener, params, model_klass = ProposedOrganisationEdit, user_klass = User, mailer_klass = AdminMailer)

      Line is too long. [98/90] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
      Open

        attr_reader :listener, :params, :organisation, :model_klass, :user_klass, :mailer_klass, :editor

      There are no issues that match your filters.

      Category
      Status