hpi-swt2/sport-portal

View on GitHub

Showing 3 of 239 total issues

Class Event has 33 methods (exceeds 20 allowed). Consider refactoring.
Open

class Event < ApplicationRecord
belongs_to :owner, class_name: 'User'
has_many :matches, -> { order gameday_number: :asc, index: :asc }, dependent: :destroy
has_many :participants
has_many :teams, through: :participants
Severity: Minor
Found in app/models/event.rb - About 4 hrs to fix

    Method new_with_session has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Confirmed

    def new_with_session(_, session)
    super.tap do |user|
    if valid_omniauth_session? session
    data = session['omniauth.data']
    user.uid = data['uid']
    Severity: Minor
    Found in app/models/user.rb - About 1 hr to fix

    Method perform_action_on_multiple_members has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def perform_action_on_multiple_members
    target_members = ensure_current_user_is_last params[:members]
    unaffected_users = []
    target_members.each do |member_id|
    @team.reload
    Severity: Minor
    Found in app/controllers/teams_controller.rb - About 25 mins to fix
    Severity
    Category
    Status
    Source
    Language