Ks89/angular-modal-gallery

View on GitHub

Showing 513 of 513 total issues

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

    DEFAULT_CASES.forEach((currentButtonConfig: ButtonsConfig, index: number) => {
      it(`should display buttons for every default buttonConfigs and subscribe to click events. Test i=${index}`, () => {
        updateInputs(IMAGE_EXTURL, currentButtonConfig);

        // expect a valid ButtonStrategy because passed to this test as input (via currentButtonConfig)
projects/ks89/angular-modal-gallery/src/lib/components/upper-buttons/upper-buttons.component.spec.ts on lines 405..445

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

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

    IGNORE_CUSTOM_CASES.forEach((currentButtonConfig: ButtonsConfig, index: number) => {
      it(`should show default buttons ignoring custom ones passed as input, because strategy != CUSTOM. Test i=${index}`, () => {
        updateInputs(IMAGE_EXTURL, currentButtonConfig);

        // expect a valid ButtonStrategy because passed to this test as input (via currentButtonConfig)
projects/ks89/angular-modal-gallery/src/lib/components/upper-buttons/upper-buttons.component.spec.ts on lines 363..403

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

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

File current-image.component.spec.ts has 982 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (C) 2017-2024 Stefano Cappa
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.

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

      describe('#emitButtonAfterHook()', () => {
        describe('---YES---', () => {
          it(`should call emitButtonAfterHook`,
            inject([ModalGalleryService], (service: ModalGalleryService) => {
              const ID: number = 1;
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 412..460

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

    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

      describe('#emitButtonBeforeHook()', () => {
        describe('---YES---', () => {
          it(`should call emitButtonBeforeHook`,
            inject([ModalGalleryService], (service: ModalGalleryService) => {
              const ID: number = 1;
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 462..510

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

    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

      describe('---NO---', () => {
    
        beforeEach(() => {
          TestBed.resetTestingModule();
          TestBed.configureTestingModule({
    projects/ks89/angular-modal-gallery/src/lib/directives/fallback-image.directive.spec.ts on lines 83..116

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

    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

      describe('---OK---', () => {
    
        beforeEach(() => {
          TestBed.resetTestingModule();
          TestBed.configureTestingModule({
    projects/ks89/angular-modal-gallery/src/lib/directives/fallback-image.directive.spec.ts on lines 118..151

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

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

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

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

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

    Refactorings

    Further Reading

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

      describe('#emitFirstImage()', () => {
        describe('---YES---', () => {
          it(`should call emitFirstImage`,
            inject([ModalGalleryService], (service: ModalGalleryService) => {
              const ID: number = 1;
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 232..266
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 268..302
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 340..374
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 376..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 321.

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

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

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

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

    Refactorings

    Further Reading

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

      describe('#emitClose()', () => {
        describe('---YES---', () => {
          it(`should call emitClose`,
            inject([ModalGalleryService], (service: ModalGalleryService) => {
              const ID: number = 1;
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 268..302
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 304..338
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 340..374
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 376..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 321.

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

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

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

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

    Refactorings

    Further Reading

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

      describe('#emitShow()', () => {
        describe('---YES---', () => {
          it(`should call emitShow`,
            inject([ModalGalleryService], (service: ModalGalleryService) => {
              const ID: number = 1;
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 232..266
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 304..338
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 340..374
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 376..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 321.

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

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

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

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

    Refactorings

    Further Reading

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

      describe('#emitHasData()', () => {
        describe('---YES---', () => {
          it(`should call emitHasData`,
            inject([ModalGalleryService], (service: ModalGalleryService) => {
              const ID: number = 1;
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 232..266
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 268..302
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 304..338
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 340..374

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

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

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

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

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

    Refactorings

    Further Reading

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

      describe('#emitLastImage()', () => {
        describe('---YES---', () => {
          it(`should call emitLastImage`,
            inject([ModalGalleryService], (service: ModalGalleryService) => {
              const ID: number = 1;
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 232..266
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 268..302
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 304..338
    projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.service.spec.ts on lines 376..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 321.

    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

    File config.service.spec.ts has 750 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     The MIT License (MIT)
    
     Copyright (c) 2017-2024 Stefano Cappa (Ks89)
    
    

      File previews.component.spec.ts has 744 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * Copyright (C) 2017-2024 Stefano Cappa
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.

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

            it(`should display modal gallery and call onDownload with downloadable = false`, () => {
              const modalGalleryService = fixture.debugElement.injector.get(ModalGalleryService);
              const configService = fixture.debugElement.injector.get(ConfigService);
        
              configService.setConfig(GALLERY_ID, {
        projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.component.spec.ts on lines 415..447
        projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.component.spec.ts on lines 513..545

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

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

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

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

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

        Refactorings

        Further Reading

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

            it(`should display modal gallery and call onDownload with downloadable = true and custom downloadFileName`, () => {
              const modalGalleryService = fixture.debugElement.injector.get(ModalGalleryService);
              const configService = fixture.debugElement.injector.get(ConfigService);
        
              configService.setConfig(GALLERY_ID, {
        projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.component.spec.ts on lines 415..447
        projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.component.spec.ts on lines 768..800

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

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

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

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

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

        Refactorings

        Further Reading

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

            it(`should display modal gallery and call onDownload with downloadable = true`, () => {
              const modalGalleryService = fixture.debugElement.injector.get(ModalGalleryService);
              const configService = fixture.debugElement.injector.get(ConfigService);
        
              configService.setConfig(GALLERY_ID, {
        projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.component.spec.ts on lines 513..545
        projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.component.spec.ts on lines 768..800

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

        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

            it(`should display modal gallery and call onCustomEmit`, () => {
              const modalGalleryService = fixture.debugElement.injector.get(ModalGalleryService);
              const configService = fixture.debugElement.injector.get(ConfigService);
        
              configService.setConfig(GALLERY_ID, { accessibilityConfig: KS_DEFAULT_ACCESSIBILITY_CONFIG });
        projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.component.spec.ts on lines 329..356

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

        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

            it(`should display modal gallery and call onDelete`, () => {
              const modalGalleryService = fixture.debugElement.injector.get(ModalGalleryService);
              const configService = fixture.debugElement.injector.get(ConfigService);
        
              configService.setConfig(GALLERY_ID, { accessibilityConfig: KS_DEFAULT_ACCESSIBILITY_CONFIG });
        projects/ks89/angular-modal-gallery/src/lib/components/modal-gallery/modal-gallery.component.spec.ts on lines 278..305

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

        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

            TEST_MODEL.forEach((val: TestModel, index: number) => {
              it(`should display current image as base64 with arrows and side previews. Test i=${index}`, () => {
                comp.id = GALLERY_ID;
                comp.images = IMAGES_BASE64;
                comp.currentImage = IMAGES_BASE64[index];
        projects/ks89/angular-modal-gallery/src/lib/components/current-image/current-image.component.spec.ts on lines 425..452

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

        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