Bloombox/Swift

View on GitHub

Showing 29 of 106 total issues

File ShopClient.swift has 357 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import Foundation
import SwiftGRPC
import OpenCannabis


Severity: Minor
Found in Sources/Client/ShopClient.swift - About 4 hrs to fix

    File TelemetryClient+Commercial.swift has 303 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import Foundation
    
    
    /// Enumerates errors that may be thrown during operations related to commercial events.
    public enum CommercialEventError: Error {
    Severity: Minor
    Found in Sources/Client/TelemetryClient+Commercial.swift - About 3 hrs to fix

      Function searchResult has 14 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        public func searchResult(term: String,
                                 total: UInt32,
                                 selected: UInt32,
                                 product: ProductKey,
                                 uuid: UUID? = nil,
      Severity: Major
      Found in Sources/Client/TelemetryClient+Search.swift - About 1 hr to fix

        Function sectionAction has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          public func sectionAction(section: MenuSection,
                                    action: SectionActionType,
                                    uuid: UUID? = nil,
                                    activeUser: UserKey? = nil,
                                    activeOrder: OrderID? = nil,
        Severity: Major
        Found in Sources/Client/TelemetryClient+Commercial.swift - About 1 hr to fix

          Function productAction has 11 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            public func productAction(product: ProductKey,
                                      action: ProductActionType,
                                      uuid: UUID? = nil,
                                      activeUser: UserKey? = nil,
                                      activeOrder: OrderID? = nil,
          Severity: Major
          Found in Sources/Client/TelemetryClient+Commercial.swift - About 1 hr to fix

            Function searchQuery has 11 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              public func searchQuery(term: String,
                                      total: UInt32,
                                      uuid: UUID? = nil,
                                      activeUser: UserKey? = nil,
                                      activeOrder: OrderID? = nil,
            Severity: Major
            Found in Sources/Client/TelemetryClient+Search.swift - About 1 hr to fix

              Function productView has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                public func productView(product: ProductKey,
                                        uuid: UUID? = nil,
                                        activeUser: UserKey? = nil,
                                        activeOrder: OrderID? = nil,
                                        partner: PartnerCode? = nil,
              Severity: Major
              Found in Sources/Client/TelemetryClient+Commercial.swift - About 1 hr to fix

                Function resolveCommercialContext has 10 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  fileprivate func resolveCommercialContext(type: CommercialEvent,
                                                            section: MenuSection? = nil,
                                                            product: ProductKey? = nil,
                                                            activeUser: UserKey? = nil,
                                                            activeOrder: OrderID? = nil,
                Severity: Major
                Found in Sources/Client/TelemetryClient+Commercial.swift - About 1 hr to fix

                  Function orderAction has 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    public func orderAction(order: Order,
                                            action: OrderActionType,
                                            uuid: UUID? = nil,
                                            activeUser: UserKey? = nil,
                                            partner: PartnerCode? = nil,
                  Severity: Major
                  Found in Sources/Client/TelemetryClient+Commercial.swift - About 1 hr to fix

                    Function sectionImpression has 10 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      public func sectionImpression(section: MenuSection,
                                                    uuid: UUID? = nil,
                                                    activeUser: UserKey? = nil,
                                                    activeOrder: OrderID? = nil,
                                                    partner: PartnerCode? = nil,
                    Severity: Major
                    Found in Sources/Client/TelemetryClient+Commercial.swift - About 1 hr to fix

                      Function sectionView has 10 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        public func sectionView(section: MenuSection,
                                                uuid: UUID? = nil,
                                                activeUser: UserKey? = nil,
                                                activeOrder: OrderID? = nil,
                                                partner: PartnerCode? = nil,
                      Severity: Major
                      Found in Sources/Client/TelemetryClient+Commercial.swift - About 1 hr to fix

                        Function beginEnrollment has 10 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          public func beginEnrollment(phone: PhoneNumber,
                                                      name: PersonName,
                                                      source: EnrollmentSource,
                                                      channel: String? = nil,
                                                      preOrder: Bool = false,
                        Severity: Major
                        Found in Sources/Client/ShopClient.swift - About 1 hr to fix

                          Function productImpression has 10 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            public func productImpression(product: ProductKey,
                                                          uuid: UUID? = nil,
                                                          activeUser: UserKey? = nil,
                                                          activeOrder: OrderID? = nil,
                                                          partner: PartnerCode? = nil,
                          Severity: Major
                          Found in Sources/Client/TelemetryClient+Commercial.swift - About 1 hr to fix

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

                              public func beginEnrollment(phone: PhoneNumber,
                                                          name: PersonName,
                                                          source: EnrollmentSource,
                                                          channel: String? = nil,
                                                          preOrder: Bool = false,
                            Severity: Major
                            Found in Sources/Client/ShopClient.swift - About 1 hr to fix

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

                                public func checkinByCard(cardType: String,
                                                          payload: String,
                                                          signature: String? = nil,
                                                          partner: PartnerCode? = nil,
                                                          location: LocationCode? = nil,
                              Severity: Major
                              Found in Sources/Client/CheckinClient.swift - About 1 hr to fix

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

                                  fileprivate func resolveSearchContext(method: SearchEvent,
                                                                        activeUser: UserKey? = nil,
                                                                        activeOrder: OrderID? = nil,
                                                                        partner: PartnerCode? = nil,
                                                                        location: LocationCode? = nil,
                                Severity: Major
                                Found in Sources/Client/TelemetryClient+Search.swift - About 1 hr to fix

                                  Function checkinByCard has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                    public func checkinByCard(cardType: String,
                                                              payload: String,
                                                              signature: String? = nil,
                                                              partner: PartnerCode? = nil,
                                                              location: LocationCode? = nil,
                                  Severity: Major
                                  Found in Sources/Client/CheckinClient.swift - About 50 mins to fix

                                    Function checkinByID has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                      public func checkinByID(scan: String,
                                                              partner: PartnerCode? = nil,
                                                              location: LocationCode? = nil,
                                                              deviceName: DeviceCode? = nil,
                                                              fingerprint: String? = nil,
                                    Severity: Major
                                    Found in Sources/Client/CheckinClient.swift - About 50 mins to fix

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

                                        public func getOrder(id: OrderID,
                                                             isLocal: Bool = false,
                                                             partner: PartnerCode? = nil,
                                                             location: LocationCode? = nil,
                                                             apiKey: APIKey? = nil,
                                      Severity: Minor
                                      Found in Sources/Client/ShopClient.swift - About 45 mins to fix

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

                                          public func submitOrder(order: Order,
                                                                  partner: PartnerCode? = nil,
                                                                  location: LocationCode? = nil,
                                                                  deviceName: DeviceCode? = nil,
                                                                  apiKey: APIKey? = nil,
                                        Severity: Minor
                                        Found in Sources/Client/ShopClient.swift - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language