Showing 9 of 48 total issues
DependencyScopeTests
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class DependencyScopeTests: XCTestCase {
override func setUp() {
Kraken.reset()
}
File DependencyScopeTests.swift
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import XCTest
@testable import Kraken
private protocol Service: Injectable {
}
Function resolve
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static func resolve(_ typeToInject: Any, tag: DependencyTagConvertible? = nil) throws -> Injectable? {
depth = depth + 1
defer {
depth = depth - 1
Function registerFactory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
fileprivate static func registerFactory<F>(_ interface: Any, tag: DependencyTagConvertible?, scope: DependencyScope, factory: F, numberOfArguments: Int = 0, completionHandler: ((Injectable) -> ())? = nil) {
Function register
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static func register(_ interface: Any, tag: DependencyTagConvertible? = nil, implementationType: Injectable.Type, scope: DependencyScope = .prototype, completionHandler: ((_ resolvedInstance: Injectable) -> ())? = nil) {
Function register
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static func register(_ interface: Any, tag: DependencyTagConvertible? = nil, scope: DependencyScope = .prototype, factory: () -> Injectable?, completionHandler: ((_ resolvedInstance: Injectable) -> ())? = nil) {
Function inject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static func inject<Arg1, Arg2, Arg3>(_ typeToInject: Any, tag: DependencyTagConvertible? = nil, withArguments arg1: Arg1, _ arg2: Arg2, _ arg3: Arg3) throws -> Injectable? {
Function inject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
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 {
Function AssertThrows
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func AssertThrows<T>(_ file: StaticString = #file, line: UInt = #line, expression: @autoclosure () throws -> T, checkError: (Error) -> Bool, _ message: String) {