weareopensource/Swift

View on GitHub
waosSwift/modules/users/controllers/UserController.swift

Summary

Maintainability
A
3 hrs
Test Coverage

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

    func bindView(_ reactor: UserReactor) {
        // buttons
        self.buttonProfil.rx.tap
            .subscribe(onNext: { _ in
                let viewController = UserViewController(reactor: reactor.editReactor(reactor.currentState.user))
Severity: Minor
Found in waosSwift/modules/users/controllers/UserController.swift - About 1 day 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

File UserController.swift has 479 lines of code (exceeds 250 allowed). Consider refactoring.
Wontfix

import UIKit
import RxSwift
import ReactorKit
import Eureka
import SafariServices
Severity: Minor
Found in waosSwift/modules/users/controllers/UserController.swift - About 7 hrs to fix

    Function bindView has 165 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

        func bindView(_ reactor: UserReactor) {
            // buttons
            self.buttonProfil.rx.tap
                .subscribe(onNext: { _ in
                    let viewController = UserViewController(reactor: reactor.editReactor(reactor.currentState.user))
    Severity: Major
    Found in waosSwift/modules/users/controllers/UserController.swift - About 6 hrs to fix

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

          func bindState(_ reactor: UserReactor) {
              // to update button content in eureka -> self.buttonProfil.updateCell()
              // image
              reactor.state
                  .map { $0.user.email }
      Severity: Major
      Found in waosSwift/modules/users/controllers/UserController.swift - About 4 hrs to fix

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

            func bindState(_ reactor: UserReactor) {
                // to update button content in eureka -> self.buttonProfil.updateCell()
                // image
                reactor.state
                    .map { $0.user.email }
        Severity: Minor
        Found in waosSwift/modules/users/controllers/UserController.swift - About 2 hrs 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 bindAction has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Wontfix

            func bindAction(_ reactor: UserReactor) {
                // init
                self.rx.viewWillAppear
                    .throttle(.milliseconds(Metric.timesRefreshData), latest: false, scheduler: MainScheduler.instance)
                    .map { _ in Reactor.Action.get }
        Severity: Major
        Found in waosSwift/modules/users/controllers/UserController.swift - About 2 hrs to fix

          Function viewDidLoad has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Wontfix

              override func viewDidLoad() {
                  super.viewDidLoad()
          
                  form
                      +++ Section { section in
          Severity: Minor
          Found in waosSwift/modules/users/controllers/UserController.swift - About 1 hr to fix

            Avoid too many return statements within this function.
            Wontfix

                            guard let appURL = URL(string: "twitter://user?screen_name=\(config["app"]["links"]["twitter"].string ?? "")") else { return }
            Severity: Major
            Found in waosSwift/modules/users/controllers/UserController.swift - About 30 mins to fix

              Avoid too many return statements within this function.
              Wontfix

                              guard let webURL = URL(string: "https://linkedin.com/company/\(config["app"]["links"]["linkedin"].string ?? "")") else { return }
              Severity: Major
              Found in waosSwift/modules/users/controllers/UserController.swift - About 30 mins to fix

                Avoid too many return statements within this function.
                Wontfix

                                guard let webURL = URL(string: "https://twitter.com/\(config["app"]["links"]["twitter"].string ?? "")") else { return }
                Severity: Major
                Found in waosSwift/modules/users/controllers/UserController.swift - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Wontfix

                                  guard let webURL = URL(string: "https://www.facebook.com/\(config["app"]["links"]["facebook"].string ?? "")") else { return }
                  Severity: Major
                  Found in waosSwift/modules/users/controllers/UserController.swift - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Wontfix

                                    guard let webURL = URL(string: "https://instagram.com/\(config["app"]["links"]["instagram"].string ?? "")") else { return }
                    Severity: Major
                    Found in waosSwift/modules/users/controllers/UserController.swift - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Wontfix

                                      guard let appURL = URL(string: "fb://profile/\(config["app"]["links"]["facebook"].string ?? "")") else { return }
                      Severity: Major
                      Found in waosSwift/modules/users/controllers/UserController.swift - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Wontfix

                                        guard let appURL = URL(string: "linkedin://company/\(config["app"]["links"]["linkedin"].string ?? "")") else { return }
                        Severity: Major
                        Found in waosSwift/modules/users/controllers/UserController.swift - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Wontfix

                                          guard let appURL = URL(string: "instagram://user?username=\(config["app"]["links"]["instagram"].string ?? "")") else { return }
                          Severity: Major
                          Found in waosSwift/modules/users/controllers/UserController.swift - About 30 mins to fix

                            Function bindAction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                func bindAction(_ reactor: UserReactor) {
                                    // init
                                    self.rx.viewWillAppear
                                        .throttle(.milliseconds(Metric.timesRefreshData), latest: false, scheduler: MainScheduler.instance)
                                        .map { _ in Reactor.Action.get }
                            Severity: Minor
                            Found in waosSwift/modules/users/controllers/UserController.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

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Wontfix

                                    self.buttonInstagram.rx.tap
                                        .subscribe(onNext: { _ in
                                            guard let appURL = URL(string: "instagram://user?username=\(config["app"]["links"]["instagram"].string ?? "")") else { return }
                                            guard let webURL = URL(string: "https://instagram.com/\(config["app"]["links"]["instagram"].string ?? "")") else { return }
                                            if UIApplication.shared.canOpenURL(appURL) {
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 2 hrs to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 279..297
                            waosSwift/modules/users/controllers/UserController.swift on lines 298..316
                            waosSwift/modules/users/controllers/UserController.swift on lines 317..335

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

                            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

                                    self.buttonTwitter.rx.tap
                                        .subscribe(onNext: { _ in
                                            guard let appURL = URL(string: "twitter://user?screen_name=\(config["app"]["links"]["twitter"].string ?? "")") else { return }
                                            guard let webURL = URL(string: "https://twitter.com/\(config["app"]["links"]["twitter"].string ?? "")") else { return }
                                            if UIApplication.shared.canOpenURL(appURL) {
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 2 hrs to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 260..278
                            waosSwift/modules/users/controllers/UserController.swift on lines 298..316
                            waosSwift/modules/users/controllers/UserController.swift on lines 317..335

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

                            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

                                    self.buttonLinkedin.rx.tap
                                        .subscribe(onNext: { _ in
                                            guard let appURL = URL(string: "linkedin://company/\(config["app"]["links"]["linkedin"].string ?? "")") else { return }
                                            guard let webURL = URL(string: "https://linkedin.com/company/\(config["app"]["links"]["linkedin"].string ?? "")") else { return }
                                            if UIApplication.shared.canOpenURL(appURL) {
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 2 hrs to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 260..278
                            waosSwift/modules/users/controllers/UserController.swift on lines 279..297
                            waosSwift/modules/users/controllers/UserController.swift on lines 317..335

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

                            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

                                    self.buttonFacebook.rx.tap
                                        .subscribe(onNext: { _ in
                                            guard let appURL = URL(string: "fb://profile/\(config["app"]["links"]["facebook"].string ?? "")") else { return }
                                            guard let webURL = URL(string: "https://www.facebook.com/\(config["app"]["links"]["facebook"].string ?? "")") else { return }
                                            if UIApplication.shared.canOpenURL(appURL) {
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 2 hrs to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 260..278
                            waosSwift/modules/users/controllers/UserController.swift on lines 279..297
                            waosSwift/modules/users/controllers/UserController.swift on lines 298..316

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

                            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

                                    self.buttonData.rx.tap
                                        .throttle(.milliseconds(Metric.timesButtonsThrottle), latest: false, scheduler: MainScheduler.instance)
                                        .subscribe(onNext: { _ in
                                            let actions: [AlertAction] = [AlertAction.action(title: L10n.modalConfirmationCancel, style: .cancel), AlertAction.action(title: L10n.modalConfirmationOk, style: .default)]
                                            self.showAlert(title: L10n.userData, message: L10n.userModalConfirmationDataMessage, style: .alert, actions: actions)
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 2 other locations - About 2 hrs to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 414..424
                            waosSwift/modules/users/controllers/UserController.swift on lines 425..435

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

                            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

                                    self.buttonDelete.rx.tap
                                        .throttle(.milliseconds(Metric.timesButtonsThrottle), latest: false, scheduler: MainScheduler.instance)
                                        .subscribe(onNext: { _ in
                                            let actions: [AlertAction] = [AlertAction.action(title: L10n.modalConfirmationCancel, style: .cancel), AlertAction.action(title: L10n.modalConfirmationOk, style: .destructive)]
                                            self.showAlert(title: L10n.userDelete, message: L10n.userModalConfirmationDeleteMessage, style: .alert, actions: actions)
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 2 other locations - About 2 hrs to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 403..413
                            waosSwift/modules/users/controllers/UserController.swift on lines 414..424

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

                            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

                                    self.buttonLogout.rx.tap
                                        .throttle(.milliseconds(Metric.timesButtonsThrottle), latest: false, scheduler: MainScheduler.instance)
                                        .subscribe(onNext: { _ in
                                            let actions: [AlertAction] = [AlertAction.action(title: L10n.modalConfirmationCancel, style: .cancel), AlertAction.action(title: L10n.modalConfirmationOk, style: .destructive)]
                                            self.showAlert(title: L10n.userLogout, message: L10n.modalConfirmationMessage, style: .alert, actions: actions)
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 2 other locations - About 2 hrs to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 403..413
                            waosSwift/modules/users/controllers/UserController.swift on lines 425..435

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

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

                                    reactor.state
                                        .map { $0.error }
                                        .filterNil()
                                        .throttle(.milliseconds(Metric.timesButtonsThrottle), latest: false, scheduler: MainScheduler.instance)
                                        .subscribe(onNext: { error in
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 9 other locations - About 2 hrs to fix
                            waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 307..317
                            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/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

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Wontfix

                                    self.buttonSupport.rx.tap
                                        .subscribe(onNext: { _ in
                                            if (L10n.linksSupport.prefix(4) == "http") {
                                                guard let url = URL(string: L10n.linksSupport) else { return }
                                                let svc = SFSafariViewController(url: url)
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 2 hrs to fix
                            waosSwift/modules/users/controllers/UserMoreController.swift on lines 113..125
                            waosSwift/modules/users/controllers/UserMoreController.swift on lines 126..138
                            waosSwift/modules/users/controllers/UserMoreController.swift on lines 139..151

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

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

                                    self.buttonContact.rx.tap
                                        .subscribe(onNext: { _ in
                                            if MFMailComposeViewController.canSendMail() {
                                                let mvc = MFMailComposeViewController()
                                                mvc.mailComposeDelegate = self
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 1 other location - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 349..359

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

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

                                    self.buttonReport.rx.tap
                                        .subscribe(onNext: { _ in
                                            if MFMailComposeViewController.canSendMail() {
                                                let mvc = MFMailComposeViewController()
                                                mvc.mailComposeDelegate = self
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 1 other location - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 338..348

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

                            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

                                    self.buttonSite.rx.tap
                                        .subscribe(onNext: { _ in
                                            guard let url = URL(string: (config["app"]["links"]["site"].string ?? "")) else { return }
                                            let svc = SFSafariViewController(url: url)
                                            self.present(svc, animated: true, completion: nil)
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 217..223
                            waosSwift/modules/users/controllers/UserController.swift on lines 231..237
                            waosSwift/modules/users/controllers/UserViewController.swift on lines 277..283

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

                            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

                                    self.buttonUs.rx.tap
                                        .subscribe(onNext: { _ in
                                            guard let url = URL(string: (config["app"]["links"]["us"].string ?? "")) else { return }
                                            let svc = SFSafariViewController(url: url)
                                            self.present(svc, animated: true, completion: nil)
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 217..223
                            waosSwift/modules/users/controllers/UserController.swift on lines 224..230
                            waosSwift/modules/users/controllers/UserViewController.swift on lines 277..283

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

                            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

                                    self.buttonBlog.rx.tap
                                        .subscribe(onNext: { _ in
                                            guard let url = URL(string: (config["app"]["links"]["blog"].string ?? "")) else { return }
                                            let svc = SFSafariViewController(url: url)
                                            self.present(svc, animated: true, completion: nil)
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 224..230
                            waosSwift/modules/users/controllers/UserController.swift on lines 231..237
                            waosSwift/modules/users/controllers/UserViewController.swift on lines 277..283

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

                            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

                                    reactor.state
                                        .map { $0.configuration }
                                        .subscribe(onNext: { configuration in
                                            if(configuration["app"]["links"]["linkedin"].string == "") {
                                                self.buttonLinkedin.hidden = true
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 464..472
                            waosSwift/modules/users/controllers/UserController.swift on lines 473..481
                            waosSwift/modules/users/controllers/UserController.swift on lines 491..499

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

                            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

                                    reactor.state
                                        .map { $0.configuration }
                                        .subscribe(onNext: { configuration in
                                            if(configuration["app"]["links"]["twitter"].string == "") {
                                                self.buttonTwitter.hidden = true
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 464..472
                            waosSwift/modules/users/controllers/UserController.swift on lines 482..490
                            waosSwift/modules/users/controllers/UserController.swift on lines 491..499

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

                            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

                                    reactor.state
                                        .map { $0.configuration }
                                        .subscribe(onNext: { configuration in
                                            if(configuration["app"]["links"]["instagram"].string == "") {
                                                self.buttonInstagram.hidden = true
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 473..481
                            waosSwift/modules/users/controllers/UserController.swift on lines 482..490
                            waosSwift/modules/users/controllers/UserController.swift on lines 491..499

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

                            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

                                    reactor.state
                                        .map { $0.configuration }
                                        .subscribe(onNext: { configuration in
                                            if(configuration["app"]["links"]["facebook"].string == "") {
                                                self.buttonFacebook.hidden = true
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 464..472
                            waosSwift/modules/users/controllers/UserController.swift on lines 473..481
                            waosSwift/modules/users/controllers/UserController.swift on lines 482..490

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

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

                                    self.buttonMore.rx.tap
                                        .subscribe(onNext: { _ in
                                            let viewController = UserMoreController(reactor: reactor.moreReactor())
                                            let navigationController = UINavigationController(rootViewController: viewController)
                                            self.present(navigationController, animated: true, completion: nil)
                            Severity: Minor
                            Found in waosSwift/modules/users/controllers/UserController.swift and 1 other location - About 1 hr to fix
                            waosSwift/modules/users/controllers/UserMoreController.swift on lines 106..112

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

                            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

                                    self.rx.viewWillAppear
                                        .throttle(.milliseconds(Metric.timesRefreshData), latest: false, scheduler: MainScheduler.instance)
                                        .map { _ in Reactor.Action.get }
                                        .bind(to: reactor.action)
                                        .disposed(by: self.disposeBag)
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 2 other locations - About 50 mins to fix
                            waosSwift/modules/home/controllers/HomePageController.swift on lines 123..127
                            waosSwift/modules/tasks/controllers/TasksListController.swift on lines 145..149

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

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

                                    reactor.state
                                        .map { $0.user.firstName }
                                        .distinctUntilChanged()
                                        .subscribe(onNext: { firstName in
                                            self.labelName.text = "\(firstName) \(reactor.currentState.user.lastName)"
                            Severity: Minor
                            Found in waosSwift/modules/users/controllers/UserController.swift and 1 other location - About 35 mins to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 508..514

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

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

                                    reactor.state
                                        .map { $0.user.lastName }
                                        .distinctUntilChanged()
                                        .subscribe(onNext: { lastName in
                                            self.labelName.text = "\(reactor.currentState.user.firstName) \(lastName)"
                            Severity: Minor
                            Found in waosSwift/modules/users/controllers/UserController.swift and 1 other location - About 35 mins to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 501..507

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

                            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

                                let buttonFacebook = ButtonRow {
                                    $0.title = "Facebook"
                                    $0.setFontAwesomeIcon("fa-facebook", style: .brands, color: Metric.facebook ?? .lightGray, opacity: 1)
                                }
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 35 mins to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 73..76
                            waosSwift/modules/users/controllers/UserController.swift on lines 77..80
                            waosSwift/modules/users/controllers/UserController.swift on lines 81..84

                            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

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Wontfix

                                let buttonTwitter = ButtonRow {
                                    $0.title = "Twitter"
                                    $0.setFontAwesomeIcon("fa-twitter", style: .brands, color: Metric.twitter ?? .lightGray, opacity: 1)
                                }
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 35 mins to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 73..76
                            waosSwift/modules/users/controllers/UserController.swift on lines 81..84
                            waosSwift/modules/users/controllers/UserController.swift on lines 85..88

                            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

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Wontfix

                                let buttonLinkedin = ButtonRow {
                                    $0.title = "Linkedin"
                                    $0.setFontAwesomeIcon("fa-linkedin", style: .brands, color: Metric.linkedin ?? .lightGray, opacity: 1)
                                }
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 35 mins to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 73..76
                            waosSwift/modules/users/controllers/UserController.swift on lines 77..80
                            waosSwift/modules/users/controllers/UserController.swift on lines 85..88

                            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

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Wontfix

                                let buttonInstagram = ButtonRow {
                                    $0.title = "Instagram"
                                    $0.setFontAwesomeIcon("fa-instagram", style: .brands, color: Metric.instagram ?? .lightGray, opacity: 1)
                                }
                            Severity: Major
                            Found in waosSwift/modules/users/controllers/UserController.swift and 3 other locations - About 35 mins to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 77..80
                            waosSwift/modules/users/controllers/UserController.swift on lines 81..84
                            waosSwift/modules/users/controllers/UserController.swift on lines 85..88

                            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

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

                                let buttonBlog = ButtonRow {
                                    $0.title = L10n.userBlog
                                    $0.setFontAwesomeIcon("fa-rss", color: Metric.secondary ?? .lightGray, opacity: 1)
                                }
                            Severity: Minor
                            Found in waosSwift/modules/users/controllers/UserController.swift and 2 other locations - About 30 mins to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 51..54
                            waosSwift/modules/users/controllers/UserController.swift on lines 107..110

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 42.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                let buttonSite = ButtonRow {
                                    $0.title = L10n.userSite
                                    $0.setFontAwesomeIcon("fa-external-link-alt", color: Metric.secondary ?? .lightGray, opacity: 1)
                                }
                            Severity: Minor
                            Found in waosSwift/modules/users/controllers/UserController.swift and 2 other locations - About 30 mins to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 55..58
                            waosSwift/modules/users/controllers/UserController.swift on lines 107..110

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 42.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                let buttonDelete = ButtonRow {
                                    $0.title = L10n.userDelete
                                    $0.setFontAwesomeIcon("fa-trash-alt", color: Metric.error ?? .red, opacity: 1)
                                }
                            Severity: Minor
                            Found in waosSwift/modules/users/controllers/UserController.swift and 2 other locations - About 30 mins to fix
                            waosSwift/modules/users/controllers/UserController.swift on lines 51..54
                            waosSwift/modules/users/controllers/UserController.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 42.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                    self.refreshControl.rx.controlEvent(.valueChanged)
                                        .map { Reactor.Action.get }
                                        .bind(to: reactor.action)
                                        .disposed(by: self.disposeBag)
                            Severity: Minor
                            Found in waosSwift/modules/users/controllers/UserController.swift and 1 other location - About 30 mins to fix
                            waosSwift/modules/tasks/controllers/TasksListController.swift on lines 151..154

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

                            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