topfreegames/khan

View on GitHub
api/membership_helpers.go

Summary

Maintainability
B
4 hrs
Test Coverage

Function dispatchApproveDenyMembershipHook has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

func dispatchApproveDenyMembershipHook(app *App, db models.DB, hookType int, gameID string, clan *models.Clan, player *models.Player, requestor *models.Player, creator *models.Player, message, playerMembershipLevel string) error {
Severity: Major
Found in api/membership_helpers.go - About 1 hr to fix

    Function dispatchMembershipHook has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func dispatchMembershipHook(app *App, db models.DB, hookType int, gameID string, clan *models.Clan, player *models.Player, requestor *models.Player, message, membershipLevel string) error {
    Severity: Major
    Found in api/membership_helpers.go - About 1 hr to fix

      Function dispatchApproveDenyMembershipHookByID has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func dispatchApproveDenyMembershipHookByID(app *App, db models.DB, hookType int, gameID string, clanID, playerID, requestorID, creatorID int64, message, membershipLevel string) error {
      Severity: Minor
      Found in api/membership_helpers.go - About 45 mins to fix

        Function dispatchMembershipHookByID has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func dispatchMembershipHookByID(app *App, db models.DB, hookType int, gameID string, clanID, playerID, requestorID int64, message, membershipLevel string) error {
        Severity: Minor
        Found in api/membership_helpers.go - About 45 mins to fix

          Function dispatchApproveDenyMembershipHookByID has 5 return statements (exceeds 4 allowed).
          Open

          func dispatchApproveDenyMembershipHookByID(app *App, db models.DB, hookType int, gameID string, clanID, playerID, requestorID, creatorID int64, message, membershipLevel string) error {
              clan, err := models.GetClanByID(db, clanID)
              if err != nil {
                  return err
              }
          Severity: Major
          Found in api/membership_helpers.go - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status