sabirvirtuoso/Mockit

View on GitHub
Example/Tests/MockMatcherTests.swift

Summary

Maintainability
F
3 wks
Test Coverage

File MockMatcherTests.swift has 829 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import XCTest
import Mockit


// MARK:- This class will match OK
Severity: Major
Found in Example/Tests/MockMatcherTests.swift - About 1 day to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    extension MockMatcherTests {
    
      func testEmptyOptionalDictionaryWithStringKeysArgumentsMatch() {
        // Given
        let firstArgument: [String: Any?] = [:]
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 1 other location - About 4 days to fix
    Example/Tests/MockMatcherTests.swift on lines 1498..1724

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1943.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    extension MockMatcherTests {
    
      func testEmptyOptionalDictionaryWithIntKeysArgumentsMatch() {
        // Given
        let firstArgument: [Int: Any?] = [:]
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 1 other location - About 4 days to fix
    Example/Tests/MockMatcherTests.swift on lines 1266..1492

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1943.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    extension MockMatcherTests {
    
      func testEmptyDictionaryWithIntKeysArgumentsMatch() {
        // Given
        let firstArgument: [Int: Any] = [:]
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 1 other location - About 3 days to fix
    Example/Tests/MockMatcherTests.swift on lines 802..1028

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1489.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    extension MockMatcherTests {
    
      func testEmptyDictionaryWithStringKeysArgumentsMatch() {
        // Given
        let firstArgument: [String: Any] = [:]
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 1 other location - About 3 days to fix
    Example/Tests/MockMatcherTests.swift on lines 1034..1260

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 1489.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    extension MockMatcherTests {
    
      func testSameFloatArgumentsMatch() {
        // Given
        let firstArgument = 10.5
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 158..188
    Example/Tests/MockMatcherTests.swift on lines 194..224
    Example/Tests/MockMatcherTests.swift on lines 230..260
    Example/Tests/MockMatcherTests.swift on lines 266..296

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 118.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    extension MockMatcherTests {
    
      func testSameStringArgumentsMatch() {
        // Given
        let firstArgument = "argument"
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 194..224
    Example/Tests/MockMatcherTests.swift on lines 230..260
    Example/Tests/MockMatcherTests.swift on lines 266..296
    Example/Tests/MockMatcherTests.swift on lines 302..332

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 118.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    extension MockMatcherTests {
    
      func testSameBoolArgumentsMatch() {
        // Given
        let firstArgument = true
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 158..188
    Example/Tests/MockMatcherTests.swift on lines 230..260
    Example/Tests/MockMatcherTests.swift on lines 266..296
    Example/Tests/MockMatcherTests.swift on lines 302..332

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 118.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    extension MockMatcherTests {
    
      func testSameDoubleArgumentsMatch() {
        // Given
        let firstArgument = 10.120
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 158..188
    Example/Tests/MockMatcherTests.swift on lines 194..224
    Example/Tests/MockMatcherTests.swift on lines 230..260
    Example/Tests/MockMatcherTests.swift on lines 302..332

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 118.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    extension MockMatcherTests {
    
      func testSameIntArgumentsMatch() {
        // Given
        let firstArgument = 10
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 158..188
    Example/Tests/MockMatcherTests.swift on lines 194..224
    Example/Tests/MockMatcherTests.swift on lines 266..296
    Example/Tests/MockMatcherTests.swift on lines 302..332

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 118.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    open class CustomMatcher: TypeMatcher {
    
      open func match(argument arg: Any, withArgument withArg: Any) -> Bool {
        switch (arg, withArg) {
          case ( _ as DifferentClassForMatching, _ as DifferentClassForMatching):
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 1 other location - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 63..76

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 104.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    open class AnotherCustomMatcher: TypeMatcher {
    
      open func match(argument arg: Any, withArgument withArg: Any) -> Bool {
        switch (arg, withArg) {
        case ( _ as AnotherDifferentClassForMatching, _ as AnotherDifferentClassForMatching):
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 1 other location - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 48..61

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 104.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentOptionalIntArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [Int?] = [2, 1, nil]
        let secondArgument: [Int?] = [2, 2, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 354..366
    Example/Tests/MockMatcherTests.swift on lines 368..380
    Example/Tests/MockMatcherTests.swift on lines 396..408
    Example/Tests/MockMatcherTests.swift on lines 438..450
    Example/Tests/MockMatcherTests.swift on lines 452..464
    Example/Tests/MockMatcherTests.swift on lines 480..492
    Example/Tests/MockMatcherTests.swift on lines 494..506
    Example/Tests/MockMatcherTests.swift on lines 522..534
    Example/Tests/MockMatcherTests.swift on lines 536..548

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameOptionalIntArrayArgumentsMatch() {
        // Given
        let firstArgument: [Int?] = [1, 2, nil]
        let secondArgument: [Int?] = [1, 2, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 354..366
    Example/Tests/MockMatcherTests.swift on lines 368..380
    Example/Tests/MockMatcherTests.swift on lines 410..422
    Example/Tests/MockMatcherTests.swift on lines 438..450
    Example/Tests/MockMatcherTests.swift on lines 452..464
    Example/Tests/MockMatcherTests.swift on lines 480..492
    Example/Tests/MockMatcherTests.swift on lines 494..506
    Example/Tests/MockMatcherTests.swift on lines 522..534
    Example/Tests/MockMatcherTests.swift on lines 536..548

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameOptionalDoubleArrayArgumentsMatch() {
        // Given
        let firstArgument: [Double?] = [10.120, 10.130, nil]
        let secondArgument: [Double?] = [10.120, 10.130, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 354..366
    Example/Tests/MockMatcherTests.swift on lines 368..380
    Example/Tests/MockMatcherTests.swift on lines 396..408
    Example/Tests/MockMatcherTests.swift on lines 410..422
    Example/Tests/MockMatcherTests.swift on lines 438..450
    Example/Tests/MockMatcherTests.swift on lines 452..464
    Example/Tests/MockMatcherTests.swift on lines 494..506
    Example/Tests/MockMatcherTests.swift on lines 522..534
    Example/Tests/MockMatcherTests.swift on lines 536..548

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentOptionalBoolArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [Bool?] = [true, false, nil]
        let secondArgument: [Bool?] = [false, true, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 354..366
    Example/Tests/MockMatcherTests.swift on lines 368..380
    Example/Tests/MockMatcherTests.swift on lines 396..408
    Example/Tests/MockMatcherTests.swift on lines 410..422
    Example/Tests/MockMatcherTests.swift on lines 438..450
    Example/Tests/MockMatcherTests.swift on lines 480..492
    Example/Tests/MockMatcherTests.swift on lines 494..506
    Example/Tests/MockMatcherTests.swift on lines 522..534
    Example/Tests/MockMatcherTests.swift on lines 536..548

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameOptionalStringArrayArgumentsMatch() {
        // Given
        let firstArgument: [String?] = ["one", "two", nil]
        let secondArgument: [String?] = ["one", "two", nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 368..380
    Example/Tests/MockMatcherTests.swift on lines 396..408
    Example/Tests/MockMatcherTests.swift on lines 410..422
    Example/Tests/MockMatcherTests.swift on lines 438..450
    Example/Tests/MockMatcherTests.swift on lines 452..464
    Example/Tests/MockMatcherTests.swift on lines 480..492
    Example/Tests/MockMatcherTests.swift on lines 494..506
    Example/Tests/MockMatcherTests.swift on lines 522..534
    Example/Tests/MockMatcherTests.swift on lines 536..548

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentOptionalFloatArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [Float?] = [10.5, 10.7, nil]
        let secondArgument: [Float?] = [10.4, 10.2, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 354..366
    Example/Tests/MockMatcherTests.swift on lines 368..380
    Example/Tests/MockMatcherTests.swift on lines 396..408
    Example/Tests/MockMatcherTests.swift on lines 410..422
    Example/Tests/MockMatcherTests.swift on lines 438..450
    Example/Tests/MockMatcherTests.swift on lines 452..464
    Example/Tests/MockMatcherTests.swift on lines 480..492
    Example/Tests/MockMatcherTests.swift on lines 494..506
    Example/Tests/MockMatcherTests.swift on lines 522..534

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentOptionalStringArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [String?] = ["one", "two", nil]
        let secondArgument: [String?] = ["one", "three", nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 354..366
    Example/Tests/MockMatcherTests.swift on lines 396..408
    Example/Tests/MockMatcherTests.swift on lines 410..422
    Example/Tests/MockMatcherTests.swift on lines 438..450
    Example/Tests/MockMatcherTests.swift on lines 452..464
    Example/Tests/MockMatcherTests.swift on lines 480..492
    Example/Tests/MockMatcherTests.swift on lines 494..506
    Example/Tests/MockMatcherTests.swift on lines 522..534
    Example/Tests/MockMatcherTests.swift on lines 536..548

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameOptionalBoolArrayArgumentsMatch() {
        // Given
        let firstArgument: [Bool?] = [true, false, nil]
        let secondArgument: [Bool?] = [true, false, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 354..366
    Example/Tests/MockMatcherTests.swift on lines 368..380
    Example/Tests/MockMatcherTests.swift on lines 396..408
    Example/Tests/MockMatcherTests.swift on lines 410..422
    Example/Tests/MockMatcherTests.swift on lines 452..464
    Example/Tests/MockMatcherTests.swift on lines 480..492
    Example/Tests/MockMatcherTests.swift on lines 494..506
    Example/Tests/MockMatcherTests.swift on lines 522..534
    Example/Tests/MockMatcherTests.swift on lines 536..548

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentOptionalDoubleArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [Double?] = [10.12, 10.5, nil]
        let secondArgument: [Double?] = [10.4, 10.12, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 354..366
    Example/Tests/MockMatcherTests.swift on lines 368..380
    Example/Tests/MockMatcherTests.swift on lines 396..408
    Example/Tests/MockMatcherTests.swift on lines 410..422
    Example/Tests/MockMatcherTests.swift on lines 438..450
    Example/Tests/MockMatcherTests.swift on lines 452..464
    Example/Tests/MockMatcherTests.swift on lines 480..492
    Example/Tests/MockMatcherTests.swift on lines 522..534
    Example/Tests/MockMatcherTests.swift on lines 536..548

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameOptionalFloatArrayArgumentsMatch() {
        // Given
        let firstArgument: [Float?] = [10.5, 10.6, nil]
        let secondArgument: [Float?] = [10.5, 10.6, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 354..366
    Example/Tests/MockMatcherTests.swift on lines 368..380
    Example/Tests/MockMatcherTests.swift on lines 396..408
    Example/Tests/MockMatcherTests.swift on lines 410..422
    Example/Tests/MockMatcherTests.swift on lines 438..450
    Example/Tests/MockMatcherTests.swift on lines 452..464
    Example/Tests/MockMatcherTests.swift on lines 480..492
    Example/Tests/MockMatcherTests.swift on lines 494..506
    Example/Tests/MockMatcherTests.swift on lines 536..548

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 84.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfOptionalStringArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [String?] = ["one", "two", nil]
        let secondArgument: [String?] = ["one", nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 424..436
    Example/Tests/MockMatcherTests.swift on lines 466..478
    Example/Tests/MockMatcherTests.swift on lines 508..520
    Example/Tests/MockMatcherTests.swift on lines 550..562

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 83.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfOptionalBoolArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [Bool?] = [true, true, nil]
        let secondArgument: [Bool?] = [true, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 382..394
    Example/Tests/MockMatcherTests.swift on lines 424..436
    Example/Tests/MockMatcherTests.swift on lines 508..520
    Example/Tests/MockMatcherTests.swift on lines 550..562

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 83.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfOptionalIntArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [Int?] = [2, 1, nil]
        let secondArgument: [Int?] = [2, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 382..394
    Example/Tests/MockMatcherTests.swift on lines 466..478
    Example/Tests/MockMatcherTests.swift on lines 508..520
    Example/Tests/MockMatcherTests.swift on lines 550..562

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 83.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfOptionalDoubleArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [Double?] = [10.5, 10.2, nil]
        let secondArgument: [Double?] = [10.5, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 382..394
    Example/Tests/MockMatcherTests.swift on lines 424..436
    Example/Tests/MockMatcherTests.swift on lines 466..478
    Example/Tests/MockMatcherTests.swift on lines 550..562

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 83.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfOptionalFloatArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument: [Float?] = [10.5, 10.2, nil]
        let secondArgument: [Float?] = [10.5, nil]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 1 hr to fix
    Example/Tests/MockMatcherTests.swift on lines 382..394
    Example/Tests/MockMatcherTests.swift on lines 424..436
    Example/Tests/MockMatcherTests.swift on lines 466..478
    Example/Tests/MockMatcherTests.swift on lines 508..520

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 83.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentFloatArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = [10.5, 10.7]
        let secondArgument = [10.4, 10.2]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 586..598
    Example/Tests/MockMatcherTests.swift on lines 600..612
    Example/Tests/MockMatcherTests.swift on lines 628..640
    Example/Tests/MockMatcherTests.swift on lines 642..654
    Example/Tests/MockMatcherTests.swift on lines 670..682
    Example/Tests/MockMatcherTests.swift on lines 684..696
    Example/Tests/MockMatcherTests.swift on lines 712..724
    Example/Tests/MockMatcherTests.swift on lines 726..738
    Example/Tests/MockMatcherTests.swift on lines 754..766

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentStringArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = ["one", "two"]
        let secondArgument = ["one", "three"]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 586..598
    Example/Tests/MockMatcherTests.swift on lines 628..640
    Example/Tests/MockMatcherTests.swift on lines 642..654
    Example/Tests/MockMatcherTests.swift on lines 670..682
    Example/Tests/MockMatcherTests.swift on lines 684..696
    Example/Tests/MockMatcherTests.swift on lines 712..724
    Example/Tests/MockMatcherTests.swift on lines 726..738
    Example/Tests/MockMatcherTests.swift on lines 754..766
    Example/Tests/MockMatcherTests.swift on lines 768..780

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameBoolArrayArgumentsMatch() {
        // Given
        let firstArgument = [true, false]
        let secondArgument = [true, false]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 586..598
    Example/Tests/MockMatcherTests.swift on lines 600..612
    Example/Tests/MockMatcherTests.swift on lines 628..640
    Example/Tests/MockMatcherTests.swift on lines 642..654
    Example/Tests/MockMatcherTests.swift on lines 684..696
    Example/Tests/MockMatcherTests.swift on lines 712..724
    Example/Tests/MockMatcherTests.swift on lines 726..738
    Example/Tests/MockMatcherTests.swift on lines 754..766
    Example/Tests/MockMatcherTests.swift on lines 768..780

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentBoolArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = [true, false]
        let secondArgument = [false, true]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 586..598
    Example/Tests/MockMatcherTests.swift on lines 600..612
    Example/Tests/MockMatcherTests.swift on lines 628..640
    Example/Tests/MockMatcherTests.swift on lines 642..654
    Example/Tests/MockMatcherTests.swift on lines 670..682
    Example/Tests/MockMatcherTests.swift on lines 712..724
    Example/Tests/MockMatcherTests.swift on lines 726..738
    Example/Tests/MockMatcherTests.swift on lines 754..766
    Example/Tests/MockMatcherTests.swift on lines 768..780

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameIntArrayArgumentsMatch() {
        // Given
        let firstArgument = [1, 2]
        let secondArgument = [1, 2]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 586..598
    Example/Tests/MockMatcherTests.swift on lines 600..612
    Example/Tests/MockMatcherTests.swift on lines 642..654
    Example/Tests/MockMatcherTests.swift on lines 670..682
    Example/Tests/MockMatcherTests.swift on lines 684..696
    Example/Tests/MockMatcherTests.swift on lines 712..724
    Example/Tests/MockMatcherTests.swift on lines 726..738
    Example/Tests/MockMatcherTests.swift on lines 754..766
    Example/Tests/MockMatcherTests.swift on lines 768..780

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentDoubleArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = [10.12, 10.5]
        let secondArgument = [10.4, 10.12]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 586..598
    Example/Tests/MockMatcherTests.swift on lines 600..612
    Example/Tests/MockMatcherTests.swift on lines 628..640
    Example/Tests/MockMatcherTests.swift on lines 642..654
    Example/Tests/MockMatcherTests.swift on lines 670..682
    Example/Tests/MockMatcherTests.swift on lines 684..696
    Example/Tests/MockMatcherTests.swift on lines 712..724
    Example/Tests/MockMatcherTests.swift on lines 754..766
    Example/Tests/MockMatcherTests.swift on lines 768..780

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameStringArrayArgumentsMatch() {
        // Given
        let firstArgument = ["one", "two"]
        let secondArgument = ["one", "two"]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 600..612
    Example/Tests/MockMatcherTests.swift on lines 628..640
    Example/Tests/MockMatcherTests.swift on lines 642..654
    Example/Tests/MockMatcherTests.swift on lines 670..682
    Example/Tests/MockMatcherTests.swift on lines 684..696
    Example/Tests/MockMatcherTests.swift on lines 712..724
    Example/Tests/MockMatcherTests.swift on lines 726..738
    Example/Tests/MockMatcherTests.swift on lines 754..766
    Example/Tests/MockMatcherTests.swift on lines 768..780

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testDifferentIntArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = [2, 1]
        let secondArgument = [2, 2]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 586..598
    Example/Tests/MockMatcherTests.swift on lines 600..612
    Example/Tests/MockMatcherTests.swift on lines 628..640
    Example/Tests/MockMatcherTests.swift on lines 670..682
    Example/Tests/MockMatcherTests.swift on lines 684..696
    Example/Tests/MockMatcherTests.swift on lines 712..724
    Example/Tests/MockMatcherTests.swift on lines 726..738
    Example/Tests/MockMatcherTests.swift on lines 754..766
    Example/Tests/MockMatcherTests.swift on lines 768..780

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameDoubleArrayArgumentsMatch() {
        // Given
        let firstArgument = [10.120, 10.130]
        let secondArgument = [10.120, 10.130]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 586..598
    Example/Tests/MockMatcherTests.swift on lines 600..612
    Example/Tests/MockMatcherTests.swift on lines 628..640
    Example/Tests/MockMatcherTests.swift on lines 642..654
    Example/Tests/MockMatcherTests.swift on lines 670..682
    Example/Tests/MockMatcherTests.swift on lines 684..696
    Example/Tests/MockMatcherTests.swift on lines 726..738
    Example/Tests/MockMatcherTests.swift on lines 754..766
    Example/Tests/MockMatcherTests.swift on lines 768..780

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      func testSameFloatArrayArgumentsMatch() {
        // Given
        let firstArgument = [10.5, 10.6]
        let secondArgument = [10.5, 10.6]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 9 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 586..598
    Example/Tests/MockMatcherTests.swift on lines 600..612
    Example/Tests/MockMatcherTests.swift on lines 628..640
    Example/Tests/MockMatcherTests.swift on lines 642..654
    Example/Tests/MockMatcherTests.swift on lines 670..682
    Example/Tests/MockMatcherTests.swift on lines 684..696
    Example/Tests/MockMatcherTests.swift on lines 712..724
    Example/Tests/MockMatcherTests.swift on lines 726..738
    Example/Tests/MockMatcherTests.swift on lines 768..780

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfBoolArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = [true, true]
        let secondArgument = [true]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 614..626
    Example/Tests/MockMatcherTests.swift on lines 656..668
    Example/Tests/MockMatcherTests.swift on lines 740..752
    Example/Tests/MockMatcherTests.swift on lines 782..794

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfIntArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = [2, 1]
        let secondArgument = [2]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 614..626
    Example/Tests/MockMatcherTests.swift on lines 698..710
    Example/Tests/MockMatcherTests.swift on lines 740..752
    Example/Tests/MockMatcherTests.swift on lines 782..794

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfStringArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = ["one", "two"]
        let secondArgument = ["one"]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 656..668
    Example/Tests/MockMatcherTests.swift on lines 698..710
    Example/Tests/MockMatcherTests.swift on lines 740..752
    Example/Tests/MockMatcherTests.swift on lines 782..794

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfDoubleArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = [10.5, 10.2]
        let secondArgument = [10.5]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 614..626
    Example/Tests/MockMatcherTests.swift on lines 656..668
    Example/Tests/MockMatcherTests.swift on lines 698..710
    Example/Tests/MockMatcherTests.swift on lines 782..794

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      func testDifferentNumberOfFloatArrayArgumentsDoNotMatch() {
        // Given
        let firstArgument = [10.5, 10.2]
        let secondArgument = [10.5]
    
    
    Severity: Major
    Found in Example/Tests/MockMatcherTests.swift and 4 other locations - About 50 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 614..626
    Example/Tests/MockMatcherTests.swift on lines 656..668
    Example/Tests/MockMatcherTests.swift on lines 698..710
    Example/Tests/MockMatcherTests.swift on lines 740..752

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      func testNilAndNonNilArgumentsDoNotMatch() {
        // Given
        let sut = mockMatcher
    
        // When
    Severity: Minor
    Found in Example/Tests/MockMatcherTests.swift and 2 other locations - About 30 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 90..99
    Example/Tests/MockMatcherTests.swift on lines 112..121

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 42.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      func testNonNilAndNilArgumentsDoNotMatch() {
        // Given
        let sut = mockMatcher
    
        // When
    Severity: Minor
    Found in Example/Tests/MockMatcherTests.swift and 2 other locations - About 30 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 90..99
    Example/Tests/MockMatcherTests.swift on lines 101..110

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 42.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      func testBothNilArgumentsMatch() {
        // Given
        let sut = mockMatcher
    
        // When
    Severity: Minor
    Found in Example/Tests/MockMatcherTests.swift and 2 other locations - About 30 mins to fix
    Example/Tests/MockMatcherTests.swift on lines 101..110
    Example/Tests/MockMatcherTests.swift on lines 112..121

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 42.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status