Showing 336 of 336 total issues

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

  protected test () {
    it('renders', async () => {
      await this.renderComponent()
      expect(screen.getAllByTestId('album-card')).toHaveLength(9)
    })
Severity: Major
Found in resources/assets/js/components/screens/AlbumListScreen.spec.ts and 1 other location - About 2 days to fix
resources/assets/js/components/screens/ArtistListScreen.spec.ts on lines 28..58

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

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

  protected test () {
    it('renders', async () => {
      await this.renderComponent()
      expect(screen.getAllByTestId('artist-card')).toHaveLength(9)
    })
resources/assets/js/components/screens/AlbumListScreen.spec.ts on lines 27..57

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

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 test has 273 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  protected test () {
    it('only initializes once', () => {
      const spy = vi.spyOn(plyr, 'setup')

      playbackService.init(document.querySelector('.plyr')!)
Severity: Major
Found in resources/assets/js/services/playbackService.spec.ts - About 1 day to fix

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

        it('removes albums by IDs', () => {
          const albums = factory<Album>('album', 3)
          albums.forEach(album => albumStore.vault.set(album.id, album))
          albumStore.state.albums = albums
    
    
    Severity: Major
    Found in resources/assets/js/stores/albumStore.spec.ts and 1 other location - About 1 day to fix
    resources/assets/js/stores/artistStore.spec.ts on lines 22..33

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

    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('removes artists by IDs', () => {
          const artists = factory<Artist>('artist', 3)
          artists.forEach(artist => artistStore.vault.set(artist.id, artist))
          artistStore.state.artists = artists
    
    
    Severity: Major
    Found in resources/assets/js/stores/artistStore.spec.ts and 1 other location - About 1 day to fix
    resources/assets/js/stores/albumStore.spec.ts on lines 22..33

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

    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('warns if attempting to shuffle an empty playlist', async () => {
          const playlist = factory<Playlist>('playlist')
          const fetchMock = this.mock(songStore, 'fetchForPlaylist').mockResolvedValue([])
          const queueMock = this.mock(playbackService, 'queueAndPlay')
          const goMock = this.mock(this.router, 'go')
    resources/assets/js/components/playlist/PlaylistContextMenu.spec.ts on lines 66..83

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

    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('warns if attempting to play an empty playlist', async () => {
          const playlist = factory<Playlist>('playlist')
          const fetchMock = this.mock(songStore, 'fetchForPlaylist').mockResolvedValue([])
          const queueMock = this.mock(playbackService, 'queueAndPlay')
          const goMock = this.mock(this.router, 'go')
    resources/assets/js/components/playlist/PlaylistContextMenu.spec.ts on lines 102..119

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

    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('warns if attempting to shuffle with no songs in folder', async () => {
          const folder = this.createPlayableFolder()
    
          const fetchMock = this.mock(songStore, 'fetchForPlaylistFolder').mockResolvedValue([])
          const queueMock = this.mock(playbackService, 'queueAndPlay')
    resources/assets/js/components/playlist/PlaylistFolderContextMenu.spec.ts on lines 56..74

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

    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('warns if attempting to play with no songs in folder', async () => {
          const folder = this.createPlayableFolder()
    
          const fetchMock = this.mock(songStore, 'fetchForPlaylistFolder').mockResolvedValue([])
          const queueMock = this.mock(playbackService, 'queueAndPlay')
    resources/assets/js/components/playlist/PlaylistFolderContextMenu.spec.ts on lines 101..119

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

    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 test has 234 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      protected test () {
        it('gets a song by ID', () => {
          const song = reactive(factory<Song>('song', { id: 'foo' }))
          songStore.vault.set('foo', reactive(song))
          songStore.vault.set('bar', reactive(factory<Song>('song', { id: 'bar' })))
    Severity: Major
    Found in resources/assets/js/stores/songStore.spec.ts - About 1 day to fix

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

          it('fetches the artist info', async () => {
            const artist = artistStore.syncWithVault(factory<Artist>('artist', { id: 42 }))[0]
            const artistInfo = factory<ArtistInfo>('artist-info')
            const getMock = this.mock(http, 'get').mockResolvedValue(artistInfo)
            const hasCacheMock = this.mock(cache, 'has', false)
      Severity: Major
      Found in resources/assets/js/services/mediaInfoService.spec.ts and 1 other location - About 1 day to fix
      resources/assets/js/services/mediaInfoService.spec.ts on lines 37..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 211.

      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('fetches the album info', async () => {
            const album = albumStore.syncWithVault(factory<Album>('album', { id: 42 }))[0]
            const albumInfo = factory<AlbumInfo>('album-info')
            const getMock = this.mock(http, 'get').mockResolvedValue(albumInfo)
            const hasCacheMock = this.mock(cache, 'has', false)
      Severity: Major
      Found in resources/assets/js/services/mediaInfoService.spec.ts and 1 other location - About 1 day to fix
      resources/assets/js/services/mediaInfoService.spec.ts on lines 10..23

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

      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 test has 187 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        protected test () {
          it('queues and plays', async () => {
            const queueMock = this.mock(queueStore, 'queueIfNotQueued')
            const playMock = this.mock(playbackService, 'play')
            const song = factory<Song>('song', { playback_state: 'Stopped' })
      Severity: Major
      Found in resources/assets/js/components/song/SongContextMenu.spec.ts - About 7 hrs to fix

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

          it('invokes album screen', () => {
            cy.$login()
            cy.$clickSidebarItem('All Songs')
        
            cy.get('#songsWrapper').within(() => cy.get('.song-item:first-child').rightclick())
        Severity: Major
        Found in cypress/integration/song-context-menu.spec.ts and 1 other location - About 7 hrs to fix
        cypress/integration/song-context-menu.spec.ts on lines 40..53

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

        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('invokes artist screen', () => {
            cy.$login()
            cy.$clickSidebarItem('All Songs')
        
            cy.get('#songsWrapper').within(() => cy.get('.song-item:first-child').rightclick())
        Severity: Major
        Found in cypress/integration/song-context-menu.spec.ts and 1 other location - About 7 hrs to fix
        cypress/integration/song-context-menu.spec.ts on lines 27..38

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

        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('gets the artist info from cache', async () => {
              const artistInfo = factory<ArtistInfo>('artist-info')
              const hasCacheMock = this.mock(cache, 'has', true)
              const getCacheMock = this.mock(cache, 'get', artistInfo)
              const getMock = this.mock(http, 'get')
        Severity: Major
        Found in resources/assets/js/services/mediaInfoService.spec.ts and 1 other location - About 7 hrs to fix
        resources/assets/js/services/mediaInfoService.spec.ts on lines 52..62

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

        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('gets the album info from cache', async () => {
              const albumInfo = factory<AlbumInfo>('album-info')
              const hasCacheMock = this.mock(cache, 'has', true)
              const getCacheMock = this.mock(cache, 'get', albumInfo)
              const getMock = this.mock(http, 'get')
        Severity: Major
        Found in resources/assets/js/services/mediaInfoService.spec.ts and 1 other location - About 7 hrs to fix
        resources/assets/js/services/mediaInfoService.spec.ts on lines 25..35

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

        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('displays the artist information', () => {
            cy.$shuffleSeveralSongs()
            cy.get('#extraTabArtist').click()
            cy.get('#extraPanelArtist').should('be.visible').within(() => {
              cy.findByTestId('artist-info').should('be.visible')
        Severity: Major
        Found in cypress/integration/extra-panel.spec.ts and 1 other location - About 6 hrs to fix
        cypress/integration/extra-panel.spec.ts on lines 41..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 166.

        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('displays the album information', () => {
            cy.$shuffleSeveralSongs()
            cy.get('#extraTabAlbum').click()
            cy.get('#extraPanelAlbum').should('be.visible').within(() => {
              cy.findByTestId('album-info').should('be.visible')
        Severity: Major
        Found in cypress/integration/extra-panel.spec.ts and 1 other location - About 6 hrs to fix
        cypress/integration/extra-panel.spec.ts on lines 29..39

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

        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('removes songs from a playlist', async () => {
              const playlist = factory<Playlist>('playlist', { id: 12 })
              const songs = factory<Song>('song', 3)
              const deleteMock = this.mock(http, 'delete').mockResolvedValue(playlist)
              const removeMock = this.mock(cache, 'remove')
        Severity: Major
        Found in resources/assets/js/stores/playlistStore.spec.ts and 1 other location - About 6 hrs to fix
        resources/assets/js/stores/playlistStore.spec.ts on lines 113..123

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 165.

        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