Ontica/Empiria.Land.Intranet

View on GitHub

Showing 370 of 516 total issues

Function reportHttpProgress has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function reportHttpProgress(saver?: (b: Blob) => void):
  (source: Observable<HttpEvent<Blob>>) => Observable<Progress> {

  return (source: Observable<HttpEvent<Blob>>) =>
    source.pipe(
Severity: Minor
Found in src/app/data-services/file-services/http-progress.ts - About 1 hr to fix

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

          case CommandType.DELETE_TRANSACTION_SERVICE:
            return this.data.deleteTransactionService(command.payload.transactionUID,
                                                      command.payload.requestedServiceUID).firstValue() as Promise<T>;
    src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
    src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
    src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
    src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
    src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
    src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
    src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
    src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
    src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272
    src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

    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

          case CommandType.REMOVE_TRANSACTION_FILE:
            return this.data.removeTransactionMediaFile(command.payload.transactionUID,
                                                        command.payload.mediaFileUID).firstValue() as Promise<T>;
    src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
    src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
    src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
    src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
    src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
    src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
    src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
    src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
    src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
    src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272

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

    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

          case CommandType.APPEND_RECORDING_ACT:
            return this.data.appendRecordingAct(command.payload.instrumentRecordingUID,
                                                command.payload.registrationCommand).firstValue() as Promise<U>;
    src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
    src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
    src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
    src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
    src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
    src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
    src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
    src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
    src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272
    src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

    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

          case CommandType.REMOVE_RECORDING_ACT:
            return this.data.removeRecordingAct(command.payload.instrumentRecordingUID,
                                                command.payload.recordingActUID).firstValue() as Promise<U>;
    src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
    src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
    src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
    src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
    src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
    src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
    src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
    src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
    src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272
    src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

    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

          case CommandType.UPDATE_TRANSACTION:
            return this.data.updateTransaction(command.payload.transactionUID,
                                               command.payload.transaction).firstValue() as Promise<T>;
    src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
    src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
    src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
    src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
    src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
    src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
    src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
    src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
    src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272
    src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

    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

          case CommandType.CREATE_INSTRUMENT_RECORDING:
            return this.data.createTransactionInstrumentRecording(command.payload.transactionUID,
                                                                  command.payload.instrument).firstValue() as Promise<U>;
    src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
    src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
    src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
    src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
    src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
    src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
    src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
    src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
    src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272
    src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

    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

          case CommandType.UPDATE_RECORDED_INSTRUMENT:
            return this.data.updateTransactionInstrumentRecording(command.payload.transactionUID,
                                                                  command.payload.instrument).firstValue() as Promise<U>;
    src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
    src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
    src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
    src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
    src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
    src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
    src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
    src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
    src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272
    src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

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

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

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

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

    Refactorings

    Further Reading

    Function execute has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      execute<U>(command: Command): Promise<U> {
    
        switch (command.type as CommandType) {
    
          case CommandType.CREATE_INSTRUMENT_RECORDING:
    Severity: Minor
    Found in src/app/presentation/land/registration.presentation.handler.ts - About 1 hr to fix

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

            case CommandType.DELETE_INSTRUMENT_RECORDING_BOOK_ENTRY:
              return this.data.deleteRecordingBookEntry(command.payload.instrumentRecordingUID,
                                                        command.payload.bookEntryUID).firstValue() as Promise<U>;
      src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
      src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
      src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
      src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
      src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
      src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
      src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
      src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
      src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272
      src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

      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

            case CommandType.SET_PAYMENT:
              return this.data.setPayment(command.payload.transactionUID,
                                          command.payload.payment).firstValue() as Promise<T>;
      src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
      src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
      src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
      src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
      src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
      src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
      src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
      src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
      src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
      src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

      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

            case CommandType.CREATE_INSTRUMENT_RECORDING_BOOK_ENTRY:
              return this.data.createNextRecordingBookEntry(command.payload.instrumentRecordingUID,
                                                            command.payload.bookEntryFields).firstValue() as Promise<U>;
      src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
      src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
      src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
      src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
      src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
      src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
      src/app/presentation/land/transaction.presentation.handler.ts on lines 256..258
      src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
      src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272
      src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

      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

        static setDisableControl(control: FormControl<any>, disable: boolean = true) {
          if (disable) {
            control.disable();
          } else {
            control.enable();
      Severity: Major
      Found in src/app/shared/utils/form-helper.ts and 1 other location - About 1 hr to fix
      src/app/shared/utils/form-helper.ts on lines 53..59

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

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

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

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

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

      Refactorings

      Further Reading

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

          if (this.recordingAct.actions.editableFields.includes('RecordingActType')) {
            this.formHelper.setControlValidators(this.form.controls.typeUID, Validators.required);
          }
      src/app/views/registration/recording-acts/recording-act-editor.component.ts on lines 171..173

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

      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

            case CommandType.ADD_TRANSACTION_SERVICE:
              return this.data.addTransactionService(command.payload.transactionUID,
                                                     command.payload.requestedService).firstValue() as Promise<T>;
      src/app/presentation/land/registration.presentation.handler.ts on lines 152..154
      src/app/presentation/land/registration.presentation.handler.ts on lines 156..158
      src/app/presentation/land/registration.presentation.handler.ts on lines 160..162
      src/app/presentation/land/registration.presentation.handler.ts on lines 164..166
      src/app/presentation/land/registration.presentation.handler.ts on lines 168..170
      src/app/presentation/land/registration.presentation.handler.ts on lines 172..174
      src/app/presentation/land/transaction.presentation.handler.ts on lines 243..245
      src/app/presentation/land/transaction.presentation.handler.ts on lines 260..262
      src/app/presentation/land/transaction.presentation.handler.ts on lines 270..272
      src/app/presentation/land/transaction.presentation.handler.ts on lines 282..284

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

      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

        static setDisableForm(form: FormGroup<any>, disable: boolean = true) {
          if (disable) {
            form.disable();
          } else {
            form.enable();
      Severity: Major
      Found in src/app/shared/utils/form-helper.ts and 1 other location - About 1 hr to fix
      src/app/shared/utils/form-helper.ts on lines 61..67

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 59.

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

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

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

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

      Refactorings

      Further Reading

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

          if (this.recordingAct.actions.editableFields.includes('Kinds')) {
            this.formHelper.setControlValidators(this.form.controls.kind, Validators.required);
          }
      src/app/views/registration/recording-acts/recording-act-editor.component.ts on lines 167..169

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

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

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

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

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

      Refactorings

      Further Reading

      Function onBookEntryListEvent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        onBookEntryListEvent(event) {
          if (this.submitted) {
            return;
          }
      
      

        Function tryParse has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          private static tryParse(value: string): Date {
            const dateParts: string[] = this.tryToConvertToDatePartsArray(value);
        
            if (!dateParts) {
              return null;
        Severity: Minor
        Found in src/app/core/data-types/date-string-library.ts - About 1 hr to fix

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

              if (this.registrationCommandRules.newPartition) {
                this.formHelper.setControlValidators(this.form.controls.partitionType, Validators.required);
                this.formHelper.setControlValidators(this.form.controls.partitionNo, Validators.required);
              } else {
                this.formHelper.clearControlValidators(this.form.controls.partitionType);
          src/app/views/transactions/transaction-header/transaction-header.component.ts on lines 237..244

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

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

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

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

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

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language