hackedteam/core-ios

View on GitHub

Showing 51 of 104 total issues

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(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

    bezier4Path.addCurveToPoint(CGPointMake(18.72 * xScalingFactor, 39.6 * yScalingFactor), controlPoint1: CGPointMake(17.76 * xScalingFactor, 0.74 * yScalingFactor), controlPoint2: CGPointMake(-2.5 * xScalingFactor, 19.04 * 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 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(16 * xScalingFactor, 0 * yScalingFactor), controlPoint1: CGPointMake(32 * xScalingFactor, 0 * yScalingFactor), controlPoint2: CGPointMake(16 * 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 170..170
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

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

            shape.frame = CGRectMake(
                CGFloat((self.bounds.width - size.width) / 2.0),
                CGFloat((self.bounds.height - size.height) / 2.0),
                size.width,
                size.height)
Severity: Minor
Found in ios-newsstand-app/newsstand-app/Keyboard/KeyboardKey.swift and 1 other location - About 50 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift on lines 86..90

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

        self.overflowCanvas.frame = CGRectMake(
            CGFloat((self.bounds.width - overflowCanvasSize.width) / 2.0),
            CGFloat((self.bounds.height - overflowCanvasSize.height) / 2.0),
            overflowCanvasSize.width,
            overflowCanvasSize.height)
Severity: Minor
Found in ios-newsstand-app/newsstand-app/Keyboard/Shapes.swift and 1 other location - About 50 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/KeyboardKey.swift on lines 373..377

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

    for key in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"] {
        var keyModel = Key(.SpecialCharacter)
        keyModel.setLetter(key)
        defaultKeyboard.addKey(keyModel, row: 0, page: 1)
    }
Severity: Major
Found in ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift and 4 other locations - About 45 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 12..16
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 62..66
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 92..96
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 98..102

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

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

            underPath.addArcWithCenter(CGPointMake(self.arcCenters[0].x, self.arcCenters[0].y - self.underOffset), radius: CGFloat(self.cornerRadius), startAngle: startAngle, endAngle: endAngle, clockwise: false)
ios-newsstand-app/newsstand-app/Keyboard/KeyboardKeyBackground.swift on lines 295..295

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

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

    for key in ["[", "]", "{", "}", "#", "%", "^", "*", "+", "="] {
        var keyModel = Key(.SpecialCharacter)
        keyModel.setLetter(key)
        defaultKeyboard.addKey(keyModel, row: 0, page: 2)
    }
Severity: Major
Found in ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift and 4 other locations - About 45 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 12..16
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 56..60
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 62..66
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 98..102

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

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

//
//  KeyboardLayout.swift
//  TransliteratingKeyboard
//
//  Created by Alexei Baboulevitch on 7/25/14.
Severity: Minor
Found in ios-newsstand-app/newsstand-app/Keyboard/KeyboardLayout.swift and 1 other location - About 45 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/KeyboardLayout.swift on lines 1..652

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

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

            underPath.addArcWithCenter(CGPointMake(self.arcCenters[3].x, self.arcCenters[3].y - self.underOffset), radius: CGFloat(self.cornerRadius), startAngle: startAngle, endAngle: endAngle, clockwise: false)
ios-newsstand-app/newsstand-app/Keyboard/KeyboardKeyBackground.swift on lines 289..289

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

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

    for key in ["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""] {
        var keyModel = Key(.SpecialCharacter)
        keyModel.setLetter(key)
        defaultKeyboard.addKey(keyModel, row: 1, page: 1)
    }
Severity: Major
Found in ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift and 4 other locations - About 45 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 12..16
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 56..60
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 92..96
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 98..102

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

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

    for key in ["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P"] {
        var keyModel = Key(.Character)
        keyModel.setLetter(key)
        defaultKeyboard.addKey(keyModel, row: 0, page: 0)
    }
Severity: Major
Found in ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift and 4 other locations - About 45 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 56..60
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 62..66
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 92..96
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 98..102

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

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

    for key in ["_", "\\", "|", "~", "<", ">", "€", "£", "Y", "•"] {
        var keyModel = Key(.SpecialCharacter)
        keyModel.setLetter(key)
        defaultKeyboard.addKey(keyModel, row: 1, page: 2)
    }
Severity: Major
Found in ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift and 4 other locations - About 45 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 12..16
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 56..60
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 62..66
ios-newsstand-app/newsstand-app/Keyboard/DefaultKeyboard.swift on lines 92..96

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

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 counterclockwise() -> Direction {
        switch self {
        case Left:
            return Down
        case Right:
Severity: Major
Found in ios-newsstand-app/newsstand-app/Keyboard/DirectionEnum.swift and 2 other locations - About 40 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/DirectionEnum.swift on lines 30..41
ios-newsstand-app/newsstand-app/Keyboard/DirectionEnum.swift on lines 56..67

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

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 clockwise() -> Direction {
        switch self {
        case Left:
            return Up
        case Right:
Severity: Major
Found in ios-newsstand-app/newsstand-app/Keyboard/DirectionEnum.swift and 2 other locations - About 40 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/DirectionEnum.swift on lines 43..54
ios-newsstand-app/newsstand-app/Keyboard/DirectionEnum.swift on lines 56..67

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

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 opposite() -> Direction {
        switch self {
        case Left:
            return Right
        case Right:
Severity: Major
Found in ios-newsstand-app/newsstand-app/Keyboard/DirectionEnum.swift and 2 other locations - About 40 mins to fix
ios-newsstand-app/newsstand-app/Keyboard/DirectionEnum.swift on lines 30..41
ios-newsstand-app/newsstand-app/Keyboard/DirectionEnum.swift on lines 43..54

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

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