rimiti/keldoc-js-sdk

View on GitHub
src/classes/index.js

Summary

Maintainability
A
0 mins
Test Coverage

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

  get availableSlots(): AvailableSlots {
    if (!this.availableSlotsClass) {
      this.availableSlotsClass = new AvailableSlots(this.configuration);
    }
    return this.availableSlotsClass;
Severity: Major
Found in src/classes/index.js and 7 other locations - About 1 hr to fix
src/classes/index.js on lines 41..46
src/classes/index.js on lines 52..57
src/classes/index.js on lines 63..68
src/classes/index.js on lines 85..90
src/classes/index.js on lines 96..101
src/classes/index.js on lines 107..112
src/classes/index.js on lines 118..123

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

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

  get specialties(): Specialties {
    if (!this.specialtiesClass) {
      this.specialtiesClass = new Specialties(this.configuration);
    }
    return this.specialtiesClass;
Severity: Major
Found in src/classes/index.js and 7 other locations - About 1 hr to fix
src/classes/index.js on lines 41..46
src/classes/index.js on lines 52..57
src/classes/index.js on lines 63..68
src/classes/index.js on lines 74..79
src/classes/index.js on lines 85..90
src/classes/index.js on lines 96..101
src/classes/index.js on lines 118..123

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

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

  get appointments(): Appointments {
    if (!this.appointmentsClass) {
      this.appointmentsClass = new Appointments(this.configuration);
    }
    return this.appointmentsClass;
Severity: Major
Found in src/classes/index.js and 7 other locations - About 1 hr to fix
src/classes/index.js on lines 41..46
src/classes/index.js on lines 63..68
src/classes/index.js on lines 74..79
src/classes/index.js on lines 85..90
src/classes/index.js on lines 96..101
src/classes/index.js on lines 107..112
src/classes/index.js on lines 118..123

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

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

  get agendas(): Agendas {
    if (!this.agendasClass) {
      this.agendasClass = new Agendas(this.configuration);
    }
    return this.agendasClass;
Severity: Major
Found in src/classes/index.js and 7 other locations - About 1 hr to fix
src/classes/index.js on lines 52..57
src/classes/index.js on lines 63..68
src/classes/index.js on lines 74..79
src/classes/index.js on lines 85..90
src/classes/index.js on lines 96..101
src/classes/index.js on lines 107..112
src/classes/index.js on lines 118..123

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

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

  get motives(): Motives {
    if (!this.motivesClass) {
      this.motivesClass = new Motives(this.configuration);
    }
    return this.motivesClass;
Severity: Major
Found in src/classes/index.js and 7 other locations - About 1 hr to fix
src/classes/index.js on lines 41..46
src/classes/index.js on lines 52..57
src/classes/index.js on lines 63..68
src/classes/index.js on lines 74..79
src/classes/index.js on lines 96..101
src/classes/index.js on lines 107..112
src/classes/index.js on lines 118..123

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

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

  get patients(): Patients {
    if (!this.patientsClass) {
      this.patientsClass = new Patients(this.configuration);
    }
    return this.patientsClass;
Severity: Major
Found in src/classes/index.js and 7 other locations - About 1 hr to fix
src/classes/index.js on lines 41..46
src/classes/index.js on lines 52..57
src/classes/index.js on lines 63..68
src/classes/index.js on lines 74..79
src/classes/index.js on lines 85..90
src/classes/index.js on lines 107..112
src/classes/index.js on lines 118..123

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

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

  get availabilities(): Availabilities {
    if (!this.availabilitiesClass) {
      this.availabilitiesClass = new Availabilities(this.configuration);
    }
    return this.availabilitiesClass;
Severity: Major
Found in src/classes/index.js and 7 other locations - About 1 hr to fix
src/classes/index.js on lines 41..46
src/classes/index.js on lines 52..57
src/classes/index.js on lines 74..79
src/classes/index.js on lines 85..90
src/classes/index.js on lines 96..101
src/classes/index.js on lines 107..112
src/classes/index.js on lines 118..123

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

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

  get config(): Config {
    if (!this.configClass) {
      this.configClass = new Config(this.configuration);
    }
    return this.configClass;
Severity: Major
Found in src/classes/index.js and 7 other locations - About 1 hr to fix
src/classes/index.js on lines 41..46
src/classes/index.js on lines 52..57
src/classes/index.js on lines 63..68
src/classes/index.js on lines 74..79
src/classes/index.js on lines 85..90
src/classes/index.js on lines 96..101
src/classes/index.js on lines 107..112

Duplicated Code

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

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

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

Tuning

This issue has a mass of 57.

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