EscolaLMS/sdk

View on GitHub
src/react/context/types.ts

Summary

Maintainability
F
1 wk
Test Coverage

File types.ts has 568 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { RequestOptionsInit } from "umi-request";
import * as API from "./../../types/api";

export interface ContextState<T> {
  loading: boolean;
Severity: Major
Found in src/react/context/types.ts - About 1 day to fix

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

      fetchProducts: (
        filter: API.PageParams &
          API.PaginationParams & {
            type?: string;
            "tags[]"?: string;
    Severity: Major
    Found in src/react/context/types.ts and 1 other location - About 2 hrs to fix
    src/react/context/types.ts on lines 334..342

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

    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

      fetchMyProducts: (
        filter: API.PageParams &
          API.PaginationParams & {
            type?: string;
            "tags[]"?: string;
    Severity: Major
    Found in src/react/context/types.ts and 1 other location - About 2 hrs to fix
    src/react/context/types.ts on lines 325..333

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

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

      fetchMyAuthoredCourses: (
        params?: API.PaginationParams
      ) => Promise<
        void | API.DefaultResponse<API.Course> | API.DefaultMetaResponse<API.Course>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 122..128
    src/react/context/types.ts on lines 236..242
    src/react/context/types.ts on lines 281..287
    src/react/context/types.ts on lines 300..306
    src/react/context/types.ts on lines 307..313
    src/react/context/types.ts on lines 354..358
    src/react/context/types.ts on lines 523..529
    src/react/context/types.ts on lines 545..551
    src/react/context/types.ts on lines 552..558

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

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

      fetchStationaryEvents: (
        filter: API.StationaryEventsParams
      ) => Promise<
        | void
        | API.DefaultResponse<API.StationaryEvent>
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 122..128
    src/react/context/types.ts on lines 194..198
    src/react/context/types.ts on lines 236..242
    src/react/context/types.ts on lines 281..287
    src/react/context/types.ts on lines 300..306
    src/react/context/types.ts on lines 354..358
    src/react/context/types.ts on lines 523..529
    src/react/context/types.ts on lines 545..551
    src/react/context/types.ts on lines 552..558

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

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

      fetchCertificates: (
        params?: API.CertificateParams
      ) => Promise<
        | void
        | API.DefaultResponse<API.Certificate>
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 122..128
    src/react/context/types.ts on lines 194..198
    src/react/context/types.ts on lines 281..287
    src/react/context/types.ts on lines 300..306
    src/react/context/types.ts on lines 307..313
    src/react/context/types.ts on lines 354..358
    src/react/context/types.ts on lines 523..529
    src/react/context/types.ts on lines 545..551
    src/react/context/types.ts on lines 552..558

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

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

      fetchFields: (
        filter: API.FieldsParams
      ) => Promise<
        | void
        | API.DefaultResponse<API.Metadata>
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 122..128
    src/react/context/types.ts on lines 194..198
    src/react/context/types.ts on lines 236..242
    src/react/context/types.ts on lines 281..287
    src/react/context/types.ts on lines 307..313
    src/react/context/types.ts on lines 354..358
    src/react/context/types.ts on lines 523..529
    src/react/context/types.ts on lines 545..551
    src/react/context/types.ts on lines 552..558

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

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

      fetchEvents: (
        filter: API.EventsParams
      ) => Promise<
        void | API.DefaultResponse<API.Event> | API.DefaultMetaResponse<API.Event>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 122..128
    src/react/context/types.ts on lines 194..198
    src/react/context/types.ts on lines 236..242
    src/react/context/types.ts on lines 281..287
    src/react/context/types.ts on lines 300..306
    src/react/context/types.ts on lines 307..313
    src/react/context/types.ts on lines 523..529
    src/react/context/types.ts on lines 545..551
    src/react/context/types.ts on lines 552..558

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

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

      fetchSubjects: (
        params?: API.SubjectsParams
      ) => Promise<
        | void
        | API.DefaultResponse<API.GroupSubject>
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 122..128
    src/react/context/types.ts on lines 194..198
    src/react/context/types.ts on lines 236..242
    src/react/context/types.ts on lines 281..287
    src/react/context/types.ts on lines 300..306
    src/react/context/types.ts on lines 307..313
    src/react/context/types.ts on lines 354..358
    src/react/context/types.ts on lines 545..551
    src/react/context/types.ts on lines 552..558

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

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

      fetchAcademicYears: (
        params?: API.AcademicYearParams
      ) => Promise<
        | void
        | API.DefaultResponse<API.AcademicYear>
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 122..128
    src/react/context/types.ts on lines 194..198
    src/react/context/types.ts on lines 236..242
    src/react/context/types.ts on lines 281..287
    src/react/context/types.ts on lines 300..306
    src/react/context/types.ts on lines 307..313
    src/react/context/types.ts on lines 354..358
    src/react/context/types.ts on lines 523..529
    src/react/context/types.ts on lines 545..551

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

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

      fetchSemesters: (
        params?: API.SemestersParams
      ) => Promise<
        | void
        | API.DefaultResponse<API.SemesterData>
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 122..128
    src/react/context/types.ts on lines 194..198
    src/react/context/types.ts on lines 236..242
    src/react/context/types.ts on lines 281..287
    src/react/context/types.ts on lines 300..306
    src/react/context/types.ts on lines 307..313
    src/react/context/types.ts on lines 354..358
    src/react/context/types.ts on lines 523..529
    src/react/context/types.ts on lines 552..558

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

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

      fetchConsultations: (
        filter: API.ConsultationParams
      ) => Promise<
        | void
        | API.DefaultResponse<API.Consultation>
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 122..128
    src/react/context/types.ts on lines 194..198
    src/react/context/types.ts on lines 236..242
    src/react/context/types.ts on lines 300..306
    src/react/context/types.ts on lines 307..313
    src/react/context/types.ts on lines 354..358
    src/react/context/types.ts on lines 523..529
    src/react/context/types.ts on lines 545..551
    src/react/context/types.ts on lines 552..558

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

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

      fetchUserGroups: (
        params: API.UserGroupsParams
      ) => Promise<
        | void
        | API.DefaultResponse<API.UserGroup>
    Severity: Major
    Found in src/react/context/types.ts and 9 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 194..198
    src/react/context/types.ts on lines 236..242
    src/react/context/types.ts on lines 281..287
    src/react/context/types.ts on lines 300..306
    src/react/context/types.ts on lines 307..313
    src/react/context/types.ts on lines 354..358
    src/react/context/types.ts on lines 523..529
    src/react/context/types.ts on lines 545..551
    src/react/context/types.ts on lines 552..558

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

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

      fetchStationaryEvent: (
        id: number
      ) => Promise<
        | void
        | API.DefaultResponse<API.StationaryEvent>
    Severity: Major
    Found in src/react/context/types.ts and 6 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 115..121
    src/react/context/types.ts on lines 214..220
    src/react/context/types.ts on lines 288..294
    src/react/context/types.ts on lines 364..370
    src/react/context/types.ts on lines 371..377
    src/react/context/types.ts on lines 480..484

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

      fetchUserGroup: (
        id: number
      ) => Promise<
        | void
        | API.DefaultResponse<API.UserGroup>
    Severity: Major
    Found in src/react/context/types.ts and 6 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 214..220
    src/react/context/types.ts on lines 288..294
    src/react/context/types.ts on lines 314..320
    src/react/context/types.ts on lines 364..370
    src/react/context/types.ts on lines 371..377
    src/react/context/types.ts on lines 480..484

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

      fetchConsultation: (
        id: number
      ) => Promise<
        | void
        | API.DefaultResponse<API.Consultation>
    Severity: Major
    Found in src/react/context/types.ts and 6 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 115..121
    src/react/context/types.ts on lines 214..220
    src/react/context/types.ts on lines 314..320
    src/react/context/types.ts on lines 364..370
    src/react/context/types.ts on lines 371..377
    src/react/context/types.ts on lines 480..484

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

      fetchTutor: (
        id: number
      ) => Promise<
        | void
        | API.DefaultResponse<API.UserItem>
    Severity: Major
    Found in src/react/context/types.ts and 6 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 115..121
    src/react/context/types.ts on lines 288..294
    src/react/context/types.ts on lines 314..320
    src/react/context/types.ts on lines 364..370
    src/react/context/types.ts on lines 371..377
    src/react/context/types.ts on lines 480..484

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

      fetchTask: (
        id: number
      ) => Promise<
        void | API.DefaultResponse<API.Task> | API.DefaultMetaResponse<API.Task>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 6 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 115..121
    src/react/context/types.ts on lines 214..220
    src/react/context/types.ts on lines 288..294
    src/react/context/types.ts on lines 314..320
    src/react/context/types.ts on lines 364..370
    src/react/context/types.ts on lines 371..377

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

      rejectConsultationTerm: (
        consultation: number
      ) => Promise<
        | void
        | API.DefaultResponse<API.AppointmentTerm>
    Severity: Major
    Found in src/react/context/types.ts and 6 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 115..121
    src/react/context/types.ts on lines 214..220
    src/react/context/types.ts on lines 288..294
    src/react/context/types.ts on lines 314..320
    src/react/context/types.ts on lines 364..370
    src/react/context/types.ts on lines 480..484

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

      approveConsultationTerm: (
        consultation: number
      ) => Promise<
        | void
        | API.DefaultResponse<API.AppointmentTerm>
    Severity: Major
    Found in src/react/context/types.ts and 6 other locations - About 1 hr to fix
    src/react/context/types.ts on lines 115..121
    src/react/context/types.ts on lines 214..220
    src/react/context/types.ts on lines 288..294
    src/react/context/types.ts on lines 314..320
    src/react/context/types.ts on lines 371..377
    src/react/context/types.ts on lines 480..484

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

      fetchTutors: () => Promise<
        | void
        | API.DefaultResponse<API.UserItem>
        | API.DefaultMetaResponse<API.UserItem>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchProfile: () => Promise<
        | void
        | API.DefaultResponse<API.UserAsProfile>
        | API.DefaultMetaResponse<API.UserAsProfile>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchConfig: () => Promise<
        | void
        | API.DefaultResponse<API.AppConfig>
        | API.DefaultMetaResponse<API.AppConfig>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchScheduleTutors: () => Promise<
        | void
        | API.DefaultResponse<API.LessonTutor>
        | API.DefaultMetaResponse<API.LessonTutor>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534

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

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

      fetchRegisterableGroups: () => Promise<
        | void
        | API.DefaultResponse<API.UserGroup>
        | API.DefaultMetaResponse<API.UserGroup>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchCart: () => Promise<
        void | API.DefaultResponse<API.Cart> | API.DefaultMetaResponse<API.Cart>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchPayments: () => Promise<
        | void
        | API.DefaultResponse<API.Payment>
        | API.DefaultMetaResponse<API.Payment>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchSchedule: () => Promise<
        | void
        | API.DefaultResponse<API.ScheduleData>
        | API.DefaultMetaResponse<API.ScheduleData>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 535..539

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

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

      fetchProgress: () => Promise<
        | void
        | API.DefaultResponse<API.CourseProgress>
        | API.DefaultMetaResponse<API.CourseProgress>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchTutorConsultations: () => Promise<
        | void
        | API.DefaultResponse<API.AppointmentTerm>
        | API.DefaultMetaResponse<API.AppointmentTerm>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchUserWebinars: () => Promise<
        | void
        | API.DefaultResponse<API.Webinar>
        | API.DefaultMetaResponse<API.Webinar>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchMattermostChannels: () => Promise<
        | void
        | API.DefaultResponse<API.MattermostData>
        | API.DefaultMetaResponse<API.MattermostData>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchPages: () => Promise<
        void | API.DefaultResponse<API.Page> | API.DefaultMetaResponse<API.Page>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchTags: () => Promise<
        void | API.DefaultResponse<API.Tag> | API.DefaultMetaResponse<API.Tag>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchUserConsultations: () => Promise<
        | void
        | API.DefaultResponse<API.Consultation>
        | API.DefaultMetaResponse<API.Consultation>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchCategories: () => Promise<
        | void
        | API.DefaultResponse<API.Category>
        | API.DefaultMetaResponse<API.Category>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchUserStationaryEvents: () => Promise<
        | void
        | API.DefaultResponse<API.StationaryEvent>
        | API.DefaultMetaResponse<API.StationaryEvent>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 141..145
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

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

      fetchSettings: () => Promise<
        | void
        | API.DefaultResponse<API.AppSettings>
        | API.DefaultMetaResponse<API.AppSettings>
      >;
    Severity: Major
    Found in src/react/context/types.ts and 17 other locations - About 55 mins to fix
    src/react/context/types.ts on lines 129..133
    src/react/context/types.ts on lines 136..140
    src/react/context/types.ts on lines 146..150
    src/react/context/types.ts on lines 151..153
    src/react/context/types.ts on lines 170..172
    src/react/context/types.ts on lines 186..190
    src/react/context/types.ts on lines 209..213
    src/react/context/types.ts on lines 226..230
    src/react/context/types.ts on lines 231..235
    src/react/context/types.ts on lines 247..251
    src/react/context/types.ts on lines 252..254
    src/react/context/types.ts on lines 295..299
    src/react/context/types.ts on lines 359..363
    src/react/context/types.ts on lines 389..393
    src/react/context/types.ts on lines 429..433
    src/react/context/types.ts on lines 530..534
    src/react/context/types.ts on lines 535..539

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

    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

    export interface ContextPaginatedState<T> {
      loading: boolean;
      list?: API.PaginatedList<T>;
      error?: API.DefaultResponseError;
    }
    Severity: Minor
    Found in src/react/context/types.ts and 1 other location - About 50 mins to fix
    src/react/context/types.ts on lines 10..14

    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

    export interface ContextPaginatedMetaState<T> {
      loading: boolean;
      list?: API.PaginatedMetaList<T>;
      error?: API.DefaultResponseError;
    }
    Severity: Minor
    Found in src/react/context/types.ts and 1 other location - About 50 mins to fix
    src/react/context/types.ts on lines 16..20

    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

      updateConsultationAccess: (
        id: number,
        data: API.ConsultationsAccessEnquiryUpdateRequest
      ) => Promise<API.DefaultResponse<API.ConsultationsAccessEnquiry>>;
    Severity: Minor
    Found in src/react/context/types.ts and 1 other location - About 45 mins to fix
    src/react/context/types.ts on lines 516..519

    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

      updateBookmarkNote: (
        id: number,
        body: API.CreateBookmarkNote
      ) => Promise<API.DefaultResponse<API.BookmarkNote>>;
    Severity: Minor
    Found in src/react/context/types.ts and 1 other location - About 45 mins to fix
    src/react/context/types.ts on lines 468..471

    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

      fetchQuestionnaireStars: (
        modelTypeTitle: string,
        modelID: number,
        id: number
      ) => Promise<API.DefaultResponse<API.QuestionnaireStars>>;
    Severity: Minor
    Found in src/react/context/types.ts and 1 other location - About 40 mins to fix
    src/react/context/types.ts on lines 401..405

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

    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

      fetchQuestionnaire: (
        modelTypeTitle: string,
        modelID: number,
        id: number
      ) => Promise<API.DefaultResponse<API.QuestionnaireAnswerResponse>>;
    Severity: Minor
    Found in src/react/context/types.ts and 1 other location - About 40 mins to fix
    src/react/context/types.ts on lines 406..410

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

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

      addConsultationAccess: (
        data: API.ConsultationsAccessEnquiryCreateRequest
      ) => Promise<API.DefaultResponse<API.ConsultationsAccessEnquiry>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      createBookmarkNote: (
        body: API.CreateBookmarkNote
      ) => Promise<API.DefaultResponse<API.BookmarkNote>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512

    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

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

      fetchTasks: (
        filter: API.TaskParams
      ) => Promise<API.DefaultMetaResponse<API.Task>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      updateProfileEmail: (
        data: API.UpdateUserEmail
      ) => Promise<API.DefaultResponse<API.UserAsProfile>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      fetchWebinars: (
        filter: API.WebinarParams
      ) => Promise<API.DefaultMetaResponse<API.Webinar>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      fetchCourses: (
        filter: API.CourseParams
      ) => Promise<API.DefaultMetaResponse<API.Course>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      addCourseAccess: (
        data: API.CourseAccessEnquiryCreateRequest
      ) => Promise<API.DefaultResponse<API.CourseAccessEnquiry>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      fetchNotifications: (
        filter?: API.PaginationParams
      ) => Promise<API.DefaultMetaResponse<API.Notification>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      fetchCourseAccess: (
        filter?: API.CourseAccessEnquiryListParams
      ) => Promise<API.DefaultMetaResponse<API.CourseAccessEnquiry>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      fetchBookmarkNotes: (
        filter?: API.BookmarkNoteParams
      ) => Promise<API.DefaultMetaResponse<API.BookmarkNote>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 513..515

    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

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

      fetchChallenges: (
        filter: API.ChallengesParams
      ) => Promise<API.DefaultMetaResponse<API.CompetencyChallenge>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      fetchPaginatedProgress: (
        filter: API.PaginatedProgressParams
      ) => Promise<API.DefaultMetaResponse<API.CourseProgressItem>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      updateProfile: (
        data: API.UpdateUserDetails
      ) => Promise<API.DefaultResponse<API.UserAsProfile>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      register: (
        body: API.RegisterRequest
      ) => Promise<API.DefaultResponse<API.RegisterResponse>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 459..461
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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

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

      fetchConsultationAccess: (
        filter?: API.CourseAccessEnquiryListParams
      ) => Promise<API.DefaultMetaResponse<API.ConsultationsAccessEnquiry>>;
    Severity: Major
    Found in src/react/context/types.ts and 14 other locations - About 30 mins to fix
    src/react/context/types.ts on lines 108..110
    src/react/context/types.ts on lines 111..113
    src/react/context/types.ts on lines 156..158
    src/react/context/types.ts on lines 191..193
    src/react/context/types.ts on lines 260..262
    src/react/context/types.ts on lines 263..265
    src/react/context/types.ts on lines 274..276
    src/react/context/types.ts on lines 350..352
    src/react/context/types.ts on lines 442..444
    src/react/context/types.ts on lines 445..447
    src/react/context/types.ts on lines 449..451
    src/react/context/types.ts on lines 462..464
    src/react/context/types.ts on lines 510..512
    src/react/context/types.ts on lines 513..515

    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