lujanfernaud/prevy

View on GitHub
app/services/sample_membership_request_creator.rb

Summary

Maintainability
A
0 mins
Test Coverage

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        message: I18n.t("sample_membership_request.message")

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Inconsistent indentation detected.
Open

    def create_notification
      sender = @membership_request.user

      MembershipRequestNotification.create(
        user: user,

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Inconsistent indentation detected.
Open

    def sample_user
      (SampleUser.all - group.members).sample
    end

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Inconsistent indentation detected.
Open

    def create_membership_request
      @membership_request = MembershipRequest.create(
        user:    sample_user,
        group:   group,
        message: I18n.t("sample_membership_request.message")

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

Inconsistent indentation detected.
Open

    attr_reader :user, :group, :membership_request

This cops checks for inconsistent indentation.

Example:

class A
  def test
    puts 'hello'
     puts 'world'
  end
end

There are no issues that match your filters.

Category
Status