tasafo/palestras-coletivas

View on GitHub
app/models/event.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Class has too many lines. [107/100]
Open

class Event
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Slug
  include Geocoder::Model::Mongoid
Severity: Minor
Found in app/models/event.rb by rubocop

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

You can set literals you want to fold with CountAsOne. Available are: 'array', 'hash', and 'heredoc'. Each literal will be counted as one line regardless of its actual size.

Example: CountAsOne: ['array', 'heredoc']

class Foo
  ARRAY = [         # +1
    1,
    2
  ]

  HASH = {          # +3
    key: 'value'
  }

  MSG = <<~HEREDOC  # +1
    Heredoc
    content.
  HEREDOC
end                 # 5 points

NOTE: This cop also applies for Struct definitions.

Event#user_organizing_events_inc doesn't depend on instance state (maybe move it to another class?)
Open

  def user_organizing_events_inc(user, inc)
Severity: Minor
Found in app/models/event.rb by reek

A Utility Function is any instance method that has no dependency on the state of the instance.

There are no issues that match your filters.

Category
Status