Ks89/angular-modal-gallery

View on GitHub

Showing 513 of 513 total issues

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

  if (!isFirstImage) {
    expect(leftPreviewImage.properties.src).toBe(prevImage.plain ? prevImage.plain.img : prevImage.modal.img);
    expect(leftPreviewImage.properties.title).toBe(val.leftPreviewTitle);
    expect(leftPreviewImage.properties.alt).toBe(val.leftPreviewAlt);
  }
projects/ks89/angular-modal-gallery/src/lib/components/current-image/current-image.component.spec.ts on lines 374..378

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

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

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

      split.forEach((item: string) => {
        if (item.trim().startsWith('width:')) {
          width = item.replace('width:', '').trim();
        } else if (item.trim().startsWith('height:')) {
          height = item.replace('height:', '').trim();
projects/ks89/angular-modal-gallery/src/lib/components/previews/previews.component.spec.ts on lines 191..197

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

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

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

    split.forEach((item: string) => {
      if (item.trim().startsWith('width:')) {
        width = item.replace('width:', '').trim();
      } else if (item.trim().startsWith('height:')) {
        height = item.replace('height:', '').trim();
projects/ks89/angular-modal-gallery/src/lib/components/upper-buttons/upper-buttons.component.spec.ts on lines 259..265

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

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

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

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

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

Refactorings

Further Reading

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

        if (index !== IMAGES.length - 1) {
          comp.changeImage.subscribe((res: ImageModalEvent) => {
            expect(res.result).toBe(index + 1);
            expect(res.action).toBe(Action.CLICK);
          });
projects/ks89/angular-modal-gallery/src/lib/components/current-image/current-image.component.spec.ts on lines 636..645

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

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

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

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

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

Refactorings

Further Reading

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

        if (currentIndex !== 0) {
          comp.changeImage.subscribe((res: ImageModalEvent) => {
            expect(res.result).toBe(currentIndex - 1);
            expect(res.action).toBe(Action.CLICK);
          });
projects/ks89/angular-modal-gallery/src/lib/components/current-image/current-image.component.spec.ts on lines 588..597

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

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

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

        configService.setConfig(GALLERY_ID, {
          currentImageConfig: {
            loadingConfig: {enable: true, type: LoadingType.STANDARD} as LoadingConfig,
            description: {strategy: DescriptionStrategy.ALWAYS_VISIBLE} as Description,
            invertSwipe: true
projects/ks89/angular-modal-gallery/src/lib/components/current-image/current-image.component.spec.ts on lines 742..750

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

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

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

        configService.setConfig(GALLERY_ID, {
          currentImageConfig: {
            loadingConfig: {enable: true, type: LoadingType.STANDARD} as LoadingConfig,
            description: {strategy: DescriptionStrategy.ALWAYS_VISIBLE} as Description,
            invertSwipe: true
projects/ks89/angular-modal-gallery/src/lib/components/current-image/current-image.component.spec.ts on lines 786..794

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

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

CarouselComponent has 30 functions (exceeds 20 allowed). Consider refactoring.
Open

@Component({
  selector: 'ks-carousel',
  styleUrls: ['carousel.scss', '../image-arrows.scss'],
  templateUrl: 'carousel.html',
  changeDetection: ChangeDetectionStrategy.OnPush,

    Consider simplifying this complex logical expression.
    Open

        if (
          !DEFAULT_CONFIG ||
          !DEFAULT_CONFIG.slideConfig ||
          !DEFAULT_CONFIG.slideConfig.sidePreviews ||
          !DEFAULT_CONFIG.previewConfig ||
    Severity: Critical
    Found in projects/ks89/angular-modal-gallery/src/lib/services/config.service.ts - About 3 hrs to fix

      Identical blocks of code found in 4 locations. Consider refactoring.
      Open

      export const LIBCONFIG_606: ModalLibConfig = {
        currentImageConfig: {
          description: {
            strategy: DescriptionStrategy.ALWAYS_VISIBLE,
            imageText: 'Look this image ',
      Severity: Major
      Found in src/app/modal-gallery/libconfigs.ts and 3 other locations - About 3 hrs to fix
      examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 404..425
      examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 404..425
      examples/universal/src/app/modal-gallery/libconfigs.ts on lines 404..425

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

      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

              it(`should call setConfig to update the library configuration with an undefined plainGalleryConfig`,
                inject([ConfigService], (service: ConfigService) => {
                  const inputConfig: LibConfig = {
                    plainGalleryConfig: undefined
                  };
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 87..96
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 138..147
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 168..177
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 373..382
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 492..501
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 521..530
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 612..621
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 644..653
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 673..682

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

      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

              it(`should call setConfig to update the library configuration with an undefined carouselImageConfig`,
                inject([ConfigService], (service: ConfigService) => {
                  const inputConfig: LibConfig = {
                    carouselImageConfig: undefined
                  };
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 87..96
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 138..147
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 168..177
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 309..318
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 373..382
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 492..501
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 612..621
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 644..653
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 673..682

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

      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

      Identical blocks of code found in 4 locations. Consider refactoring.
      Open

      export const LIBCONFIG_606: ModalLibConfig = {
        currentImageConfig: {
          description: {
            strategy: DescriptionStrategy.ALWAYS_VISIBLE,
            imageText: 'Look this image ',
      Severity: Major
      Found in examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts and 3 other locations - About 3 hrs to fix
      examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 404..425
      examples/universal/src/app/modal-gallery/libconfigs.ts on lines 404..425
      src/app/modal-gallery/libconfigs.ts on lines 404..425

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

      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

              it(`should call setConfig to update the library configuration with an undefined slideConfig`,
                inject([ConfigService], (service: ConfigService) => {
                  const inputConfig: LibConfig = {
                    slideConfig: undefined
                  };
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 138..147
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 168..177
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 309..318
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 373..382
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 492..501
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 521..530
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 612..621
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 644..653
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 673..682

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

      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

              it(`should call setConfig to update the library configuration with an undefined accessibilityConfig`,
                inject([ConfigService], (service: ConfigService) => {
                  const inputConfig: LibConfig = {
                    accessibilityConfig: undefined
                  };
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 87..96
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 168..177
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 309..318
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 373..382
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 492..501
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 521..530
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 612..621
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 644..653
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 673..682

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

      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

      Identical blocks of code found in 4 locations. Consider refactoring.
      Open

      export const LIBCONFIG_606: ModalLibConfig = {
        currentImageConfig: {
          description: {
            strategy: DescriptionStrategy.ALWAYS_VISIBLE,
            imageText: 'Look this image ',
      examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 404..425
      examples/universal/src/app/modal-gallery/libconfigs.ts on lines 404..425
      src/app/modal-gallery/libconfigs.ts on lines 404..425

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

      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

              it(`should call setConfig to update the library configuration with an undefined carouselPreviewsConfig`,
                inject([ConfigService], (service: ConfigService) => {
                  const inputConfig: LibConfig = {
                    carouselPreviewsConfig: undefined
                  };
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 87..96
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 138..147
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 168..177
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 309..318
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 373..382
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 492..501
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 521..530
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 612..621
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 644..653

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

      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

              it(`should call setConfig to update the library configuration with an undefined keyboardConfig`,
                inject([ConfigService], (service: ConfigService) => {
                  const inputConfig: LibConfig = {
                    keyboardConfig: undefined
                  };
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 87..96
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 138..147
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 168..177
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 309..318
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 373..382
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 521..530
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 612..621
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 644..653
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 673..682

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

      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

              it(`should call setConfig to update the library configuration with an undefined previewConfig`,
                inject([ConfigService], (service: ConfigService) => {
                  const inputConfig: LibConfig = {
                    previewConfig: undefined
                  };
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 87..96
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 138..147
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 309..318
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 373..382
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 492..501
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 521..530
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 612..621
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 644..653
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 673..682

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

      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

              it(`should call setConfig to update the library configuration with an undefined currentImageConfig`,
                inject([ConfigService], (service: ConfigService) => {
                  const inputConfig: LibConfig = {
                    currentImageConfig: undefined
                  };
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 87..96
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 138..147
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 168..177
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 309..318
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 492..501
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 521..530
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 612..621
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 644..653
      projects/ks89/angular-modal-gallery/src/lib/services/config.service.spec.ts on lines 673..682

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

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

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

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

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

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language