hackedteam/core-ios

View on GitHub

Showing 104 of 104 total issues

Function drawShift has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

func drawShift(bounds: CGRect, color: UIColor, withRect: Bool) {
    let factors = getFactors(CGSizeMake(38, (withRect ? 34 + 4 : 32)), bounds)
    let xScalingFactor = factors.xScalingFactor
    let yScalingFactor = factors.yScalingFactor
    let lineWidthScalingFactor = factors.lineWidthScalingFactor
Severity: Minor
Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift - About 1 hr to fix

    Function handleControl has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        func handleControl(view: UIView?, controlEvent: UIControlEvents) {
            if let control = view as? UIControl {
                let targets = control.allTargets()
                for target in targets.allObjects { // TODO: Xcode crashes
                    var actions = control.actionsForTarget(target, forControlEvent: controlEvent)
    Severity: Minor
    Found in ios-newsstand-app/newsstand-app/Keyboard/ForwardingView.swift - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function keyCapForCase has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        func keyCapForCase(uppercase: Bool) -> String {
            if uppercase {
                if self.uppercaseKeyCap != nil {
                    return self.uppercaseKeyCap!
                }
    Severity: Minor
    Found in ios-newsstand-app/newsstand-app/Keyboard/KeyboardModel.swift - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function willShowPopup has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        func willShowPopup(key: KeyboardKey, direction: Direction) {
            // TODO: actual numbers, not standins
            if let popup = key.popup {
                // TODO: total hack
                let actualSuperview = (self.superview.superview != nil ? self.superview.superview! : self.superview)
    Severity: Minor
    Found in ios-newsstand-app/newsstand-app/Keyboard/KeyboardLayout.swift - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function outputForCase has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        func outputForCase(uppercase: Bool) -> String {
            if uppercase {
                if self.uppercaseOutput != nil {
                    return self.uppercaseOutput!
                }
    Severity: Minor
    Found in ios-newsstand-app/newsstand-app/Keyboard/KeyboardModel.swift - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

            if (rect.origin.y + rect.size.height < point.y) {
                closest.y += rect.size.height
            }
            else if (point.y > rect.origin.y) {
                closest.y = point.y
    ios-newsstand-app/newsstand-app/Keyboard/ForwardingView.swift on lines 100..105

    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 73.

    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

            if (rect.origin.x + rect.size.width < point.x) {
                closest.x += rect.size.width
            }
            else if (point.x > rect.origin.x) {
                closest.x = point.x
    ios-newsstand-app/newsstand-app/Keyboard/ForwardingView.swift on lines 106..111

    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 73.

    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

    Function updateNotSent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        func updateNotSent(text: String!) {
            // println("updateNotSent")
            if self.managedObjectContext == nil {
                return
            }
    Severity: Minor
    Found in ios-newsstand-app/newsstand-app/Keyboard/CustomKeyboard.swift - About 1 hr to fix

      Function layoutSubviews has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          override func layoutSubviews() {
              self.layoutPopupIfNeeded()
              
              var boundingBox = (self.popup != nil ? CGRectUnion(self.bounds, self.popup!.frame) : self.bounds)
              
      Severity: Minor
      Found in ios-newsstand-app/newsstand-app/Keyboard/KeyboardKey.swift - About 1 hr to fix

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

                self.label.frame = CGRectMake((self.bounds.width - self.bounds.width * CGFloat(0.8)) / CGFloat(2), 0, self.bounds.width * CGFloat(0.8), self.bounds.height)
        Severity: Major
        Found in ios-newsstand-app/newsstand-app/Keyboard/KeyboardKey.swift and 1 other location - About 1 hr to fix
        ios-newsstand-app/newsstand-app/Keyboard/KeyboardKey.swift on lines 49..49

        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 70.

        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

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

            func layoutCharacterWithSidesRow(row: [Key], modelToView: [Key:KeyboardKey], keyWidth: CGFloat, gapWidth: CGFloat, mostCharactersInRowInAllPages: Int, m: CGFloat, c: CGFloat, frame: CGRect) {
        Severity: Major
        Found in ios-newsstand-app/newsstand-app/Keyboard/KeyboardLayout.swift - About 1 hr to fix

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

                      self.label.frame = CGRectMake((self.bounds.width - self.bounds.width * CGFloat(0.8)) / CGFloat(2), 0, self.bounds.width * CGFloat(0.8), self.bounds.height)
          Severity: Major
          Found in ios-newsstand-app/newsstand-app/Keyboard/KeyboardKey.swift and 1 other location - About 1 hr to fix
          ios-newsstand-app/newsstand-app/Keyboard/KeyboardKey.swift on lines 250..250

          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 70.

          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 12 locations. Consider refactoring.
          Open

              bezierPath.addCurveToPoint(CGPointMake(44 * xScalingFactor, 6 * yScalingFactor), controlPoint1: CGPointMake(44 * xScalingFactor, 22 * yScalingFactor), controlPoint2: CGPointMake(44 * xScalingFactor, 6 * yScalingFactor))
          Severity: Major
          Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift and 11 other locations - About 55 mins to fix
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 168..168
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 170..170
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 171..171
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 229..229
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 230..230
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 231..231
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 232..232
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 292..292
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 303..303
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 314..314
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 325..325

          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 66.

          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 12 locations. Consider refactoring.
          Open

              bezier5Path.addCurveToPoint(CGPointMake(34 * xScalingFactor, 7 * yScalingFactor), controlPoint1: CGPointMake(6 * xScalingFactor, 7 * yScalingFactor), controlPoint2: CGPointMake(19 * xScalingFactor, 21 * yScalingFactor))
          Severity: Major
          Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift and 11 other locations - About 55 mins to fix
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 168..168
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 169..169
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 170..170
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 171..171
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 229..229
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 230..230
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 231..231
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 232..232
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 292..292
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 303..303
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 325..325

          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 66.

          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 12 locations. Consider refactoring.
          Open

              bezierPath.addCurveToPoint(CGPointMake(44 * xScalingFactor, 26 * yScalingFactor), controlPoint1: CGPointMake(38 * xScalingFactor, 32 * yScalingFactor), controlPoint2: CGPointMake(44 * xScalingFactor, 32 * yScalingFactor))
          Severity: Major
          Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift and 11 other locations - About 55 mins to fix
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 169..169
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 170..170
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 171..171
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 229..229
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 230..230
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 231..231
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 232..232
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 292..292
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 303..303
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 314..314
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 325..325

          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 66.

          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 12 locations. Consider refactoring.
          Open

              bezierPath.addCurveToPoint(CGPointMake(24 * xScalingFactor, 32 * yScalingFactor), controlPoint1: CGPointMake(16 * xScalingFactor, 32 * yScalingFactor), controlPoint2: CGPointMake(24 * xScalingFactor, 32 * yScalingFactor))
          Severity: Major
          Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift and 11 other locations - About 55 mins to fix
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 168..168
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 169..169
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 170..170
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 171..171
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 229..229
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 231..231
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 232..232
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 292..292
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 303..303
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 314..314
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 325..325

          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 66.

          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 12 locations. Consider refactoring.
          Open

              bezierPath.addCurveToPoint(CGPointMake(36 * xScalingFactor, 0 * yScalingFactor), controlPoint1: CGPointMake(44 * xScalingFactor, 6 * yScalingFactor), controlPoint2: CGPointMake(44 * xScalingFactor, 0 * yScalingFactor))
          Severity: Major
          Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift and 11 other locations - About 55 mins to fix
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 168..168
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 169..169
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 171..171
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 229..229
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 230..230
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 231..231
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 232..232
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 292..292
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 303..303
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 314..314
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 325..325

          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 66.

          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 12 locations. Consider refactoring.
          Open

              bezierPath.addCurveToPoint(CGPointMake(28 * xScalingFactor, 28 * yScalingFactor), controlPoint1: CGPointMake(24 * xScalingFactor, 32 * yScalingFactor), controlPoint2: CGPointMake(28 * xScalingFactor, 32 * yScalingFactor))
          Severity: Major
          Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift and 11 other locations - About 55 mins to fix
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 168..168
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 169..169
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 170..170
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 171..171
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 229..229
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 230..230
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 232..232
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 292..292
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 303..303
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 314..314
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 325..325

          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 66.

          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 12 locations. Consider refactoring.
          Open

              bezier6Path.addCurveToPoint(CGPointMake(34 * xScalingFactor, 33 * yScalingFactor), controlPoint1: CGPointMake(6 * xScalingFactor, 33 * yScalingFactor), controlPoint2: CGPointMake(19 * xScalingFactor, 22 * yScalingFactor))
          Severity: Major
          Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift and 11 other locations - About 55 mins to fix
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 168..168
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 169..169
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 170..170
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 171..171
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 229..229
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 230..230
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 231..231
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 232..232
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 292..292
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 303..303
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 314..314

          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 66.

          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 12 locations. Consider refactoring.
          Open

              bezierPath.addCurveToPoint(CGPointMake(14 * xScalingFactor, 32 * yScalingFactor), controlPoint1: CGPointMake(10 * xScalingFactor, 28 * yScalingFactor), controlPoint2: CGPointMake(10 * xScalingFactor, 32 * yScalingFactor))
          Severity: Major
          Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift and 11 other locations - About 55 mins to fix
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 168..168
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 169..169
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 170..170
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 171..171
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 230..230
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 231..231
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 232..232
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 292..292
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 303..303
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 314..314
          ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 325..325

          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 66.

          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

          Severity
          Category
          Status
          Source
          Language