Ontica/Empiria.Land.Intranet

View on GitHub
src/app/presentation/land/registration.presentation.handler.ts

Summary

Maintainability
D
2 days
Test Coverage

Function dispatch has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  dispatch(actionType: ActionType, params?: any): void {
    switch (actionType) {

      case ActionType.SELECT_TRANSACTION_INSTRUMENT_RECORDING:
        Assertion.assertValue(params.transactionInstrumentRecording, 'params.transactionInstrumentRecording');
Severity: Minor
Found in src/app/presentation/land/registration.presentation.handler.ts - About 1 hr to fix

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

            case CommandType.UPDATE_RECORDABLE_SUBJECT:
              return this.data.updateRecordableSubject(command.payload.instrumentRecordingUID,
                                                       command.payload.recordingActUID,
                                                       command.payload.recordableSubjectFields).firstValue() as Promise<U>;
      src/app/presentation/land/transaction.presentation.handler.ts on lines 277..280

      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

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

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

            case SelectorType.RECORDING_ACT_TYPES_LIST_FOR_RECORDABLE_SUBJECT:
              Assertion.assertValue(params.recordableSubjectUID, 'params.recordableSubjectUID');
      
              return this.data.getRecordingActTypesForRecordableSubject(params.recordableSubjectUID) as EmpObservable<U>;
      src/app/presentation/land/recordable-subjects.presentation.handler.ts on lines 71..74
      src/app/presentation/land/recordable-subjects.presentation.handler.ts on lines 137..140
      src/app/presentation/land/recordable-subjects.presentation.handler.ts on lines 142..145
      src/app/presentation/land/registration.presentation.handler.ts on lines 100..103

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

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

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

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

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

      Refactorings

      Further Reading

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

            case SelectorType.RECORDING_ACT_TYPES_LIST_FOR_INSTRUMENT:
              Assertion.assertValue(params.instrumentUID, 'params.instrumentUID');
      
              return this.data.getRecordingActTypesForInstrument(params.instrumentUID) as EmpObservable<U>;
      src/app/presentation/land/recordable-subjects.presentation.handler.ts on lines 71..74
      src/app/presentation/land/recordable-subjects.presentation.handler.ts on lines 137..140
      src/app/presentation/land/recordable-subjects.presentation.handler.ts on lines 142..145
      src/app/presentation/land/registration.presentation.handler.ts on lines 105..108

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

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

            case CommandType.OPEN_REGISTRATION:
              return this.data.openRegistration(command.payload.instrumentRecordingUID).firstValue() as Promise<U>;
      Severity: Major
      Found in src/app/presentation/land/registration.presentation.handler.ts and 8 other locations - About 45 mins to fix
      src/app/presentation/land/registration.presentation.handler.ts on lines 181..182
      src/app/presentation/land/transaction.presentation.handler.ts on lines 240..241
      src/app/presentation/land/transaction.presentation.handler.ts on lines 247..248
      src/app/presentation/land/transaction.presentation.handler.ts on lines 250..251
      src/app/presentation/land/transaction.presentation.handler.ts on lines 253..254
      src/app/presentation/land/transaction.presentation.handler.ts on lines 264..265
      src/app/presentation/land/transaction.presentation.handler.ts on lines 267..268
      src/app/presentation/land/transaction.presentation.handler.ts on lines 274..275

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 50.

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

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

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

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

      Refactorings

      Further Reading

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

            case CommandType.CLOSE_REGISTRATION:
              return this.data.closeRegistration(command.payload.instrumentRecordingUID).firstValue() as Promise<U>;
      Severity: Major
      Found in src/app/presentation/land/registration.presentation.handler.ts and 8 other locations - About 45 mins to fix
      src/app/presentation/land/registration.presentation.handler.ts on lines 185..186
      src/app/presentation/land/transaction.presentation.handler.ts on lines 240..241
      src/app/presentation/land/transaction.presentation.handler.ts on lines 247..248
      src/app/presentation/land/transaction.presentation.handler.ts on lines 250..251
      src/app/presentation/land/transaction.presentation.handler.ts on lines 253..254
      src/app/presentation/land/transaction.presentation.handler.ts on lines 264..265
      src/app/presentation/land/transaction.presentation.handler.ts on lines 267..268
      src/app/presentation/land/transaction.presentation.handler.ts on lines 274..275

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 50.

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

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

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

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

      Refactorings

      Further Reading

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

        constructor(private data: RecordingDataService) {
          super({
            initialState,
            selectors: SelectorType,
            commands: CommandType,
      Severity: Minor
      Found in src/app/presentation/land/registration.presentation.handler.ts and 1 other location - About 45 mins to fix
      src/app/presentation/land/transaction.presentation.handler.ts on lines 102..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 50.

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

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

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

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

      Refactorings

      Further Reading

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

      export enum ActionType {
        SELECT_TRANSACTION_INSTRUMENT_RECORDING   =  'Land.Registration.Action.SelectTransactionInstrumentRecording',
        UNSELECT_TRANSACTION_INSTRUMENT_RECORDING = 'Land.Registration.Action.UnselectTransactionInstrumentRecording',
        SELECT_REGISTRY_ENTRY   = 'Land.Registration.Action.SelectRegistryEntry',
        UNSELECT_REGISTRY_ENTRY = 'Land.Registration.Action.UnselectRegistryEntry',
      Severity: Minor
      Found in src/app/presentation/land/registration.presentation.handler.ts and 2 other locations - About 35 mins to fix
      src/app/models/_data-table.ts on lines 46..55
      src/app/views/transactions/transaction-header/transaction-header.component.ts on lines 23..32

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

      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

            case ActionType.SELECT_BOOK_ENTRY:
              Assertion.assertValue(params.bookEntry, 'payload.bookEntry');
              this.setValue(SelectorType.SELECTED_BOOK_ENTRY, params.bookEntry);
              return;
      Severity: Minor
      Found in src/app/presentation/land/registration.presentation.handler.ts and 1 other location - About 30 mins to fix
      src/app/presentation/main-layout/main-layout.presentation.handler.ts on lines 98..102

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 45.

      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