Ontica/Empiria.Land.Intranet

View on GitHub

Showing 370 of 516 total issues

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

  private resetColumns() {
    this.displayedColumns = [...this.displayedColumnsDefault];

    if (this.canEdit) {
      this.displayedColumns.push('actionDelete');
src/app/views/transactions/transaction-editor/requested-services/requested-service-list.component.ts on lines 76..82

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

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

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

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

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

Refactorings

Further Reading

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

      case SubjectHeaderEventType.ACTIVATE_SUBJECT:
        return `Esta operación desbloqueará la cuenta:
                <strong> (${this.subject.userID}) ${this.subject.fullName} - ${this.subject.employeeNo} </strong>.
                <br><br>¿Desbloqueo la cuenta?`;
src/app/views/_access-control/subjects/subject-header.component.ts on lines 253..256
src/app/views/_access-control/subjects/subject-header.component.ts on lines 258..261

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

      case SubjectHeaderEventType.SUSPEND_SUBJECT:
        return `Esta operación suspenderá la cuenta:
                <strong> (${this.subject.userID}) ${this.subject.fullName} - ${this.subject.employeeNo} </strong>.
                <br><br>¿Suspendo la cuenta?`;
src/app/views/_access-control/subjects/subject-header.component.ts on lines 248..251
src/app/views/_access-control/subjects/subject-header.component.ts on lines 258..261

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

      case SubjectHeaderEventType.DELETE_SUBJECT:
        return `Esta operación <strong>dará de baja / eliminará</strong> la cuenta
                <strong> (${this.subject.userID}) ${this.subject.fullName} - ${this.subject.employeeNo} </strong>.
                <br><br>¿Doy de baja la cuenta?`;
src/app/views/_access-control/subjects/subject-header.component.ts on lines 248..251
src/app/views/_access-control/subjects/subject-header.component.ts on lines 253..256

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

      case ActionType.SET_IS_USER_WORKING:
        Assertion.assert(typeof payload === 'boolean', `${actionType} payload must be a boolean value.`);
        this.setValue(SelectorType.IS_USER_WORKING, payload);
        return;
src/app/presentation/main-layout/main-layout.presentation.handler.ts on lines 86..90

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

      case ActionType.SET_IS_PROCESSING_FLAG:
        Assertion.assert(typeof payload === 'boolean', `${actionType} payload must be a boolean value.`);

        this.setValue(SelectorType.IS_PROCESSING, payload);
        return;
src/app/presentation/app-data/app-status.presentation.handler.ts on lines 80..83

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

      case CommandType.GENERATE_PAYMENT_ORDER:
        return this.data.generatePaymentOrder(command.payload.transactionUID).firstValue() as Promise<T>;
Severity: Major
Found in src/app/presentation/land/transaction.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/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 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.CLONE_TRANSACTION:
        return this.data.cloneTransaction(command.payload.transactionUID).firstValue() as Promise<T>;
Severity: Major
Found in src/app/presentation/land/transaction.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/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 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 4 locations. Consider refactoring.
Open

      case ListEventType.ITEM_EXECUTE_OPERATION:
        Assertion.assertValue(event.payload.item, 'event.payload.item');
        sendEvent(this.landExplorerEvent, LandExplorerEventType.ITEM_EXECUTE_OPERATION, event.payload);
        return;
src/app/views/land-list/land-explorer/land-explorer.component.ts on lines 123..126
src/app/views/search-services/record-search/record-search-list.component.ts on lines 43..47
src/app/views/search-services/tract-index-explorer/tract-index-entries-history.component.ts on lines 44..50

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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.CREATE_TRANSACTION:
        return this.data.createTransaction(command.payload.transaction).firstValue() as Promise<T>;
Severity: Major
Found in src/app/presentation/land/transaction.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/registration.presentation.handler.ts on lines 185..186
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 4 locations. Consider refactoring.
Open

    if (this.passwordRules.upperRequired && this.form.controls.newPassword.errors?.hasUpper) {
      rules.push('mayúsculas');
    }
src/app/views/_security/change-password/change-password-form.component.ts on lines 168..170
src/app/views/_security/change-password/change-password-form.component.ts on lines 172..174
src/app/views/_security/change-password/change-password-form.component.ts on lines 176..179

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.DELETE_TRANSACTION:
        return this.data.deleteTransaction(command.payload.transactionUID).firstValue() as Promise<T>;
Severity: Major
Found in src/app/presentation/land/transaction.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/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 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.SUBMIT_TRANSACTION:
        return this.data.submitTransaction(command.payload.transactionUID).firstValue() as Promise<T>;
Severity: Major
Found in src/app/presentation/land/transaction.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/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 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 4 locations. Consider refactoring.
Open

    if (this.passwordRules.lowerRequired && this.form.controls.newPassword.errors?.hasLower) {
      rules.push('minúsculas');
    }
src/app/views/_security/change-password/change-password-form.component.ts on lines 164..166
src/app/views/_security/change-password/change-password-form.component.ts on lines 172..174
src/app/views/_security/change-password/change-password-form.component.ts on lines 176..179

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.CANCEL_PAYMENT:
        return this.data.cancelPayment(command.payload.transactionUID).firstValue() as Promise<T>;
Severity: Major
Found in src/app/presentation/land/transaction.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/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

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

      case ListEventType.ITEM_SELECTED:
        Assertion.assertValue(event.payload.item, 'event.payload.item');
        sendEvent(this.landExplorerEvent, LandExplorerEventType.ITEM_SELECTED, event.payload);
        return;
src/app/views/land-list/land-explorer/land-explorer.component.ts on lines 128..131
src/app/views/search-services/record-search/record-search-list.component.ts on lines 43..47
src/app/views/search-services/tract-index-explorer/tract-index-entries-history.component.ts on lines 44..50

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

Function amendmentRecordingActPlaceholder has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

  get amendmentRecordingActPlaceholder(): string {
    if (this.registrationCommandRules.selectSubject &&
      this.formHelper.isControlInvalid(this.form.controls.recordableSubject)) {
      return 'Seleccione el folio real';
    }

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

      case CommandType.CANCEL_PAYMENT_ORDER:
        return this.data.cancelPaymentOrder(command.payload.transactionUID).firstValue() as Promise<T>;
Severity: Major
Found in src/app/presentation/land/transaction.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/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 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

Severity
Category
Status
Source
Language