orizens/echoes-player

View on GitHub

Showing 70 of 70 total issues

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

    it('should verify tracks are NOY cued correctly', () => {
      const tracks = service.extractTracks(<any>Mocks
        .VideoMockWithTracksLengthOnly.snippet.description);
      const isValid = service.verifyTracksCue(tracks);
      expect(isValid).toBeFalsy();
Severity: Major
Found in src/app/core/services/media-parser.service.spec.ts and 1 other location - About 1 hr to fix
src/app/core/services/media-parser.service.spec.ts on lines 45..50

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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 convert "6:30" to 420 seconds', () => {
      const time = '06:30';
      const actual = service.toNumber(time);
      const expected = 6 * 60 + 30;
      expect(actual).toBe(expected);
Severity: Major
Found in src/app/core/services/media-parser.service.spec.ts and 1 other location - About 1 hr to fix
src/app/core/services/media-parser.service.spec.ts on lines 61..66

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

    it('should convert "06:30" to 420 seconds', () => {
      const time = '06:30';
      const actual = service.toNumber(time);
      const expected = 6 * 60 + 30;
      expect(actual).toBe(expected);
Severity: Major
Found in src/app/core/services/media-parser.service.spec.ts and 1 other location - About 1 hr to fix
src/app/core/services/media-parser.service.spec.ts on lines 68..73

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

Function exports has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (config) {
  let options = {
    basePath: '',
    frameworks: ['jasmine', '@angular-devkit/build-angular'],
    plugins: [
Severity: Minor
Found in karma.conf.js - About 1 hr to fix

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

      @Effect({ dispatch: false })
      trackPlay$ = this.actions$.pipe(
        ofType(ActionTypes.PLAY_STARTED),
        map(toPayload),
        tap(() => this.analytics.trackVideoPlay())
    Severity: Major
    Found in src/app/core/effects/analytics.effects.ts and 1 other location - About 1 hr to fix
    src/app/core/effects/analytics.effects.ts on lines 24..29

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

    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

      @Effect({ dispatch: false })
      trackToken$ = this.actions$.pipe(
        ofType(UserProfileActions.USER_PROFILE_RECIEVED),
        map(toPayload),
        tap(() => this.analytics.trackSignin())
    Severity: Major
    Found in src/app/core/effects/analytics.effects.ts and 1 other location - About 1 hr to fix
    src/app/core/effects/analytics.effects.ts on lines 42..47

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

    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

      @Effect({ dispatch: false })
      checkForNewAppVersion$ = this.actions$.pipe(
        ofType(fromAppCore.ActionTypes.APP_CHECK_VERSION),
        map(() => this.versionCheckerService.checkForVersion())
      );
    Severity: Major
    Found in src/app/core/effects/app-core.effects.ts and 2 other locations - About 1 hr to fix
    src/app/core/effects/app-core.effects.ts on lines 19..23
    src/app/core/effects/app-player.effects.ts on lines 43..47

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

    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 NOT notify of new version when version is an empty string', () => {
          const newState = appLayout(
            state,
            new AppCore.RecievedAppVersion(mockedAppPackageJson)
          );
    Severity: Major
    Found in src/app/core/store/app-core/app-core.spec.ts and 1 other location - About 1 hr to fix
    src/app/core/store/app-core/app-core.spec.ts on lines 133..140

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

    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

      @Effect({ dispatch: false })
      updateAppVersion$ = this.actions$.pipe(
        ofType(fromAppCore.ActionTypes.APP_UPDATE_VERSION),
        map(() => this.versionCheckerService.updateVersion())
      );
    Severity: Major
    Found in src/app/core/effects/app-core.effects.ts and 2 other locations - About 1 hr to fix
    src/app/core/effects/app-core.effects.ts on lines 25..29
    src/app/core/effects/app-player.effects.ts on lines 43..47

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

    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

      @Effect({ dispatch: false })
      pauseVideo$ = this.actions$.pipe(
        ofType(AppPlayer.ActionTypes.PAUSE),
        tap(() => this.youtubePlayerService.pause())
      );
    Severity: Major
    Found in src/app/core/effects/app-player.effects.ts and 2 other locations - About 1 hr to fix
    src/app/core/effects/app-core.effects.ts on lines 19..23
    src/app/core/effects/app-core.effects.ts on lines 25..29

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

    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 restore status of new version availability to false', () => {
          const newState = appLayout(
            state,
            new AppCore.RecievedAppVersion(mockedAppPackageJson)
          );
    Severity: Major
    Found in src/app/core/store/app-core/app-core.spec.ts and 1 other location - About 1 hr to fix
    src/app/core/store/app-core/app-core.spec.ts on lines 69..76

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

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

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

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

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

    Refactorings

    Further Reading

    Function constructor has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      constructor(
        private http: HttpClient,
        private zone: NgZone,
        private youtubeVideosInfo: YoutubeVideosInfo,
        private authorization: Authorization
    Severity: Minor
    Found in src/app/core/services/user-profile.service.ts - About 1 hr to fix

      Function player has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function player(
        state: IAppPlayer = initialPlayerState,
        action: Actions
      ): IAppPlayer {
        switch (action.type) {
      Severity: Minor
      Found in src/app/core/store/app-player/app-player.reducer.ts - About 1 hr to fix

        Function fetchAllPlaylistItems has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          fetchAllPlaylistItems(playlistId: string) {
            let items = [];
            const subscriptions: Subscription[] = [];
            const items$ = new Subject();
            let nextPageToken = '';
        Severity: Minor
        Found in src/app/core/services/user-profile.service.ts - About 1 hr to fix

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

            it('should render minutes and seconds', () => {
              const duration = 'PT4M1S';
              const actual = pipe.transform(duration, []);
              const expected = '04:01';
              expect(actual).toBe(expected);
          Severity: Major
          Found in src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts and 4 other locations - About 1 hr to fix
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 18..23
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 25..30
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 32..37
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 46..51

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

            it('should render hour, no minutes and seconds', () => {
              const duration = 'PT2H33S';
              const actual = pipe.transform(duration, []);
              const expected = '02:00:33';
              expect(actual).toBe(expected);
          Severity: Major
          Found in src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts and 4 other locations - About 1 hr to fix
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 25..30
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 32..37
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 39..44
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 46..51

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

            it('should render hour, 2 digit minutes (less than 10) and seconds', () => {
              const duration = 'PT2H09M33S';
              const actual = pipe.transform(duration, []);
              const expected = '02:09:33';
              expect(actual).toBe(expected);
          Severity: Major
          Found in src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts and 4 other locations - About 1 hr to fix
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 18..23
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 32..37
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 39..44
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 46..51

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

            it('should render just seconds', () => {
              const duration = 'PT35S';
              const actual = pipe.transform(duration, []);
              const expected = '00:35';
              expect(actual).toBe(expected);
          Severity: Major
          Found in src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts and 4 other locations - About 1 hr to fix
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 18..23
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 25..30
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 32..37
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 39..44

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

            it('should render hour, 2 digit minutes (above 10) and seconds', () => {
              const duration = 'PT2H45M33S';
              const actual = pipe.transform(duration, []);
              const expected = '02:45:33';
              expect(actual).toBe(expected);
          Severity: Major
          Found in src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts and 4 other locations - About 1 hr to fix
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 18..23
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 25..30
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 39..44
          src/app/shared/pipes/toFriendlyDuration.pipe.spec.ts on lines 46..51

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

            @Effect({ dispatch: false })
            navigateBack$ = this.actions$.pipe(
              ofType(fromRouterActions.BACK),
              tap(() => this.location.back())
            );
          Severity: Major
          Found in src/app/core/effects/router.effects.ts and 2 other locations - About 1 hr to fix
          src/app/core/effects/router.effects.ts on lines 25..29
          src/app/core/effects/user-profile.effects.ts on lines 136..140

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

          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