weareopensource/Swift

View on GitHub
waosSwift/modules/auth/controllers/AuthSigninController.swift

Summary

Maintainability
C
1 day
Test Coverage

Function setupConstraints has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

    override func setupConstraints() {
        self.width = self.view.frame.width
        // errors
        labelErrors.snp.makeConstraints {  (make) -> Void in
            make.width.equalTo(300)
Severity: Major
Found in waosSwift/modules/auth/controllers/AuthSigninController.swift - About 2 hrs to fix

    File AuthSigninController.swift has 254 lines of code (exceeds 250 allowed). Consider refactoring.
    Wontfix

    import UIKit
    import RxSwift
    import RxRelay
    import ReactorKit
    import AuthenticationServices
    Severity: Minor
    Found in waosSwift/modules/auth/controllers/AuthSigninController.swift - About 2 hrs to fix

      Function bindState has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Wontfix

          func bindState(_ reactor: AuthSigninReactor) {
              // refreshing
              reactor.state
                  .map { $0.isRefreshing }
                  .distinctUntilChanged()
      Severity: Minor
      Found in waosSwift/modules/auth/controllers/AuthSigninController.swift - About 1 hr to fix

        Function bindAction has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Wontfix

            func bindAction(_ reactor: AuthSigninReactor) {
                // button signin
                buttonSignin.rx.tap
                    .throttle(.milliseconds(Metric.timesButtonsThrottle), latest: false, scheduler: MainScheduler.instance)
                    .map { _ in Reactor.Action.signIn }
        Severity: Minor
        Found in waosSwift/modules/auth/controllers/AuthSigninController.swift - About 1 hr to fix

          Function bindState has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Wontfix

              func bindState(_ reactor: AuthSigninReactor) {
                  // refreshing
                  reactor.state
                      .map { $0.isRefreshing }
                      .distinctUntilChanged()
          Severity: Minor
          Found in waosSwift/modules/auth/controllers/AuthSigninController.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 bindView has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Wontfix

              func bindView(_ reactor: AuthSigninReactor) {
                  // button signup
                  self.buttonSignup.rx.tap
                      .map(reactor.signUpReactor)
                      .subscribe(onNext: { [weak self] reactor in
          Severity: Minor
          Found in waosSwift/modules/auth/controllers/AuthSigninController.swift - About 1 hr to fix

            Function bindView has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Wontfix

                func bindView(_ reactor: AuthSigninReactor) {
                    // button signup
                    self.buttonSignup.rx.tap
                        .map(reactor.signUpReactor)
                        .subscribe(onNext: { [weak self] reactor in
            Severity: Minor
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift - About 25 mins 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

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

                    reactor.state
                        .map { $0.error }
                        .filterNil()
                        .throttle(.milliseconds(Metric.timesButtonsThrottle), latest: false, scheduler: MainScheduler.instance)
                        .subscribe(onNext: { error in
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 360..370
            waosSwift/modules/home/controllers/HomePageController.swift on lines 153..163
            waosSwift/modules/home/controllers/HomeTermsController.swift on lines 130..140
            waosSwift/modules/tasks/controllers/TasksListController.swift on lines 205..215
            waosSwift/modules/tasks/controllers/TasksViewController.swift on lines 141..151
            waosSwift/modules/users/controllers/UserController.swift on lines 536..546
            waosSwift/modules/users/controllers/UserMoreController.swift on lines 186..196
            waosSwift/modules/users/controllers/UserPreferenceController.swift on lines 139..149
            waosSwift/modules/users/controllers/UserViewController.swift on lines 460..470

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

            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

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

                    reactor.state
                        .map { $0.errors.count }
                        .distinctUntilChanged()
                        .subscribe(onNext: { count in
                            if(count > 0) {
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 227..242

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

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

                    Observable.combineLatest(
                        reactor.state
                            .map { $0.errors.count > 0 }
                            .distinctUntilChanged(),
                        reactor.state
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 243..254
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 347..358

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

            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

                    buttonSignin.snp.makeConstraints { (make) -> Void in
                        make.width.equalTo(140)
                        make.height.equalTo(50)
                        make.centerX.equalTo(self.view).offset(80)
                        make.top.equalTo(self.inputPassword.snp.bottom).offset(10)
            waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 135..140

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

                    buttonSignup.snp.makeConstraints { (make) -> Void in
                        make.width.equalTo(140)
                        make.height.equalTo(50)
                        make.centerX.equalTo(self.view).offset(-80)
                        make.top.equalTo(self.inputPassword.snp.bottom).offset(10)
            waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 141..146

            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 3 locations. Consider refactoring.
            Wontfix

                    inputEmail.snp.makeConstraints { (make) -> Void in
                        make.width.equalTo(300)
                        make.height.equalTo(50)
                        make.centerX.equalTo(self.view)
                        make.centerY.equalTo(self.view).offset(-60).keyboard(false, in: self.view)
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 106..111
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 121..126

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

                    labelErrors.snp.makeConstraints {  (make) -> Void in
                        make.width.equalTo(300)
                        make.height.equalTo(50)
                        make.centerX.equalTo(self.view)
                        make.bottom.equalTo(self.inputEmail.snp.top).offset(-10)
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 93..98
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 100..105
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 115..120
            waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 128..133
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 114..119
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 130..135
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 136..141
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 142..147
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 148..153
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 155..160

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

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

                    inputPassword.snp.makeConstraints { (make) -> Void in
                        make.width.equalTo(300)
                        make.height.equalTo(50)
                        make.centerX.equalTo(self.view)
                        make.top.equalTo(self.inputEmail.snp.bottom).offset(10)
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 93..98
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 100..105
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 115..120
            waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 112..117
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 114..119
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 130..135
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 136..141
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 142..147
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 148..153
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 155..160

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

            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

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

                let inputPassword = CoreUITextField().then {
                    $0.autocorrectionType = .no
                    $0.placeholder = L10n.authPassword + "..."
                    $0.autocapitalizationType = .none
                    $0.returnKeyType = .done
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 42..50

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

            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 6 locations. Consider refactoring.
            Wontfix

                    self.inputEmail.rx.controlEvent(.editingChanged).asObservable()
                        .debounce(.milliseconds(Metric.timesErrorsDebounce), scheduler: MainScheduler.instance)
                        .map {Reactor.Action.validateEmail}
                        .bind(to: reactor.action)
                        .disposed(by: self.disposeBag)
            Severity: Major
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift and 5 other locations - About 55 mins to fix
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 190..194
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 230..234
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 241..245
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 252..256
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 263..267

            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

            Identical blocks of code found in 3 locations. Consider refactoring.
            Wontfix

                    self.backgroundImage.snp.makeConstraints { make in
                        make.top.equalTo(self.view)
                        make.centerX.equalTo(self.view)
                        make.width.height.equalTo(self.view.frame.height + self.width/5)
                    }
            Severity: Major
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift and 2 other locations - About 55 mins to fix
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 122..126
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 162..166

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

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

                    self.inputPassword.rx.text
                        .filter {($0?.count)! > 0}
                        .map {Reactor.Action.updatePassword($0!)}
                        .bind(to: reactor.action)
                        .disposed(by: self.disposeBag)
            Severity: Major
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift and 6 other locations - About 55 mins to fix
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 185..189
            waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 250..254
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 225..229
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 236..240
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 247..251
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 258..262

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

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

                    self.inputEmail.rx.text
                        .filter { ($0?.count)! > 0 }
                        .map {Reactor.Action.updateEmail($0!)}
                        .bind(to: reactor.action)
                        .disposed(by: self.disposeBag)
            Severity: Major
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift and 6 other locations - About 55 mins to fix
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 185..189
            waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 261..265
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 225..229
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 236..240
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 247..251
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 258..262

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

            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 4 locations. Consider refactoring.
            Wontfix

                    buttonSignin.rx.tap
                        .throttle(.milliseconds(Metric.timesButtonsThrottle), latest: false, scheduler: MainScheduler.instance)
                        .map { _ in Reactor.Action.signIn }
                        .bind(to: reactor.action)
                        .disposed(by: self.disposeBag)
            Severity: Major
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift and 3 other locations - About 50 mins to fix
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 173..177
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 213..217
            waosSwift/modules/onBoarding/controllers/OnBoardingController.swift on lines 131..135

            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

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

                let inputEmail = CoreUITextField().then {
                    $0.autocorrectionType = .no
                    $0.placeholder = L10n.authMail + "..."
                    $0.autocapitalizationType = .none
                    $0.textContentType = .username
            Severity: Major
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift and 2 other locations - About 50 mins to fix
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 24..31
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 35..41

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

                    inputEmail.snp.prepareConstraints { (make) -> Void in
                        make.centerY.equalTo(self.view).offset(-160).keyboard(true, in: self.view)
                    }
            Severity: Major
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift and 2 other locations - About 40 mins to fix
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 112..114
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 127..129

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

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

                let buttonSignin = CoreUIButton().then {
                    $0.setTitle(L10n.authSignInTitle, for: .normal)
                    $0.setTitleColor(Metric.secondary, for: .normal)
                }
            Severity: Minor
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift and 2 other locations - About 35 mins to fix
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 32..35
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 55..58

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

            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

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

                let backgroundImage = UIImageView().then {
                    $0.contentMode = .scaleToFill
                    $0.image = UIImage(named: "authBackground")
                    $0.alpha = 0.4
                }
            Severity: Minor
            Found in waosSwift/modules/auth/controllers/AuthSigninController.swift and 2 other locations - About 35 mins to fix
            waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 48..52
            waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 66..70

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

            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