sabirvirtuoso/Kraken

View on GitHub

Showing 9 of 48 total issues

DependencyScopeTests has 28 methods (exceeds 20 allowed). Consider refactoring.
Open

class DependencyScopeTests: XCTestCase {

    override func setUp() {
        Kraken.reset()
    }
Severity: Minor
Found in Example/Tests/DependencyScopeTests.swift - About 3 hrs to fix

    File DependencyScopeTests.swift has 267 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import XCTest
    @testable import Kraken
    
    private protocol Service: Injectable {
    }
    Severity: Minor
    Found in Example/Tests/DependencyScopeTests.swift - About 2 hrs to fix

      Function resolve has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static func resolve(_ typeToInject: Any, tag: DependencyTagConvertible? = nil) throws -> Injectable? {
              depth = depth + 1
      
              defer {
                  depth = depth - 1
      Severity: Minor
      Found in Pod/Classes/Kraken.swift - About 1 hr to fix

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

            fileprivate static func registerFactory<F>(_ interface: Any, tag: DependencyTagConvertible?, scope: DependencyScope, factory: F, numberOfArguments: Int = 0, completionHandler: ((Injectable) -> ())? = nil) {
        Severity: Minor
        Found in Pod/Classes/RuntimeArguments.swift - About 45 mins to fix

          Function register has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static func register(_ interface: Any, tag: DependencyTagConvertible? = nil, implementationType: Injectable.Type,  scope: DependencyScope = .prototype, completionHandler: ((_ resolvedInstance: Injectable) -> ())? = nil) {
          Severity: Minor
          Found in Pod/Classes/Kraken.swift - About 35 mins to fix

            Function register has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public static func register(_ interface: Any, tag: DependencyTagConvertible? = nil, scope: DependencyScope = .prototype, factory: () -> Injectable?, completionHandler: ((_ resolvedInstance: Injectable) -> ())? = nil) {
            Severity: Minor
            Found in Pod/Classes/RuntimeArguments.swift - About 35 mins to fix

              Function inject has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public static func inject<Arg1, Arg2, Arg3>(_ typeToInject: Any, tag: DependencyTagConvertible? = nil, withArguments arg1: Arg1, _ arg2: Arg2, _ arg3: Arg3) throws -> Injectable? {
              Severity: Minor
              Found in Pod/Classes/RuntimeArguments.swift - About 35 mins to fix

                Function inject has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                public func inject<Arg1, Arg2, Arg3, T>(_ typeToInject: T.Type, tag: DependencyTagConvertible? = nil, withArguments arg1: Arg1, _ arg2: Arg2, _ arg3: Arg3) -> T where T: Any {
                Severity: Minor
                Found in Pod/Classes/RuntimeArguments.swift - About 35 mins to fix

                  Function AssertThrows has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  func AssertThrows<T>(_ file: StaticString = #file, line: UInt = #line, expression: @autoclosure () throws -> T, checkError: (Error) -> Bool, _ message: String) {
                  Severity: Minor
                  Found in Example/Tests/Utils.swift - About 35 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language