app/policies/map_policy.rb
Class MapPolicy
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class MapPolicy < ApplicationPolicy
class Scope < Scope
def resolve
visible = %w[public commons]
return scope.where(permission: visible) unless user
- Create a ticketCreate a ticket
Assignment Branch Condition size for resolve is too high. [16.06/16] Open
Open
def resolve
visible = %w[public commons]
return scope.where(permission: visible) unless user
scope.where(permission: visible)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric