Showing 134 of 387 total issues

Method up has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function up(): void
    {
        Schema::create('podcasts', static function (Blueprint $table): void {
            $table->string('id', 36)->primary();
            $table->string('url')->unique()->comment('The URL to the podcast feed')->unique();

    Function test has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      protected test () {
        it('renders', () => expect(this.render(LoginFrom).html()).toMatchSnapshot())
    
        it('logs in', async () => {
          expect((await this.submitForm(this.mock(authService, 'login'))).emitted().loggedin).toBeTruthy()
    Severity: Minor
    Found in resources/assets/js/components/auth/LoginForm.spec.ts - About 1 hr to fix

      Function test has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        protected test () {
          it('fetches the recently played songs', async () => {
            const songs = factory('song', 3)
            const getMock = this.mock(http, 'get').mockResolvedValue(songs)
            const syncMock = this.mock(songStore, 'syncWithVault', songs)
      Severity: Minor
      Found in resources/assets/js/stores/recentlyPlayedStore.spec.ts - About 1 hr to fix

        Function test has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          protected test () {
            it('creates invite link', async () => {
              const playlist = factory('playlist', { is_smart: false })
              const postMock = this.mock(http, 'post').mockResolvedValue({ token: 'abc123' })
        
        
        Severity: Minor
        Found in resources/assets/js/services/playlistCollaborationService.spec.ts - About 1 hr to fix

          Function test has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            protected test () {
              it('contains proper items for song-only lists', () => {
                this.render(Component)
          
                ;['Title', 'Album', 'Artist', 'Track & Disc', 'Time', 'Date Added'].forEach(text => screen.getByText(text))
          Severity: Minor
          Found in resources/assets/js/components/song/SongListSorter.spec.ts - About 1 hr to fix

            Function test has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              protected test () {
                it('accepts an invitation', async () => {
                  const postMock = this.mock(http, 'post').mockResolvedValue({
                    'audio-token': 'my-audio-token',
                    'token': 'my-token',
            Severity: Minor
            Found in resources/assets/js/services/invitationService.spec.ts - About 1 hr to fix

              Function test has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                protected test () {
                  it('creates playlist with no playables', async () => {
                    const folder = factory('playlist-folder')
                    const storeMock = this.mock(playlistStore, 'store').mockResolvedValue(factory('playlist'))
              
              
              Severity: Minor
              Found in resources/assets/js/components/playlist/CreatePlaylistForm.spec.ts - About 1 hr to fix

                Function test has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  protected test () {
                    it.each([[0], [1]])('shuffles all if %s songs are selected', async (selectedCount: number) => {
                      const { emitted } = this.renderComponent(selectedCount)
                
                      await this.user.click(screen.getByTitle('Shuffle all. Press Alt/⌥ to change mode.'))
                Severity: Minor
                Found in resources/assets/js/components/song/SongListControls.spec.ts - About 1 hr to fix

                  Method fromGetId3Info has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function fromGetId3Info(array $info, string $path): self
                      {
                          // We prefer ID3v2 tags over ID3v1 tags.
                          $tags = array_merge(
                              Arr::get($info, 'tags.id3v1', []),
                  Severity: Minor
                  Found in app/Values/SongScanInformation.php - About 1 hr to fix

                    Function setup has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const setup = () => {
                        const referenceElement = extractRef(reference)
                        const floatingElement = extractRef(floating)
                    
                        floatingElement.style.display = 'none'
                    Severity: Minor
                    Found in resources/assets/js/composables/useFloatingUi.ts - About 1 hr to fix

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

                      const init = (el: ElementWithTooltip, binding: DirectiveBinding) => {
                        const $tooltip = getOrCreateTooltip(el)
                      
                        // make sure the actual title is removed from the element, but keep a backup for the updated() hook calls
                        $tooltip.querySelector<HTMLDivElement>('.tooltip-content')!.textContent = binding.value
                      Severity: Minor
                      Found in resources/assets/js/directives/tooltip.ts - About 1 hr to fix

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

                          protected test () {
                            it('performs an excerpt search', async () => {
                              const result: ExcerptSearchResult = {
                                playables: factory('song', 3),
                                albums: factory('album', 3),
                        Severity: Minor
                        Found in resources/assets/js/stores/searchStore.spec.ts - About 1 hr to fix

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

                            protected test () {
                              it('invites single email', async () => {
                                const inviteMock = this.mock(invitationService, 'invite')
                                const alertMock = this.mock(MessageToasterStub.value, 'success')
                          
                          
                          Severity: Minor
                          Found in resources/assets/js/components/user/InviteUserForm.spec.ts - About 1 hr to fix

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

                              protected test () {
                                it('renders the playlist', async () => {
                                  await this.renderComponent(factory('song', 10))
                            
                                  await waitFor(() => {
                            Severity: Minor
                            Found in resources/assets/js/components/screens/PlaylistScreen.spec.ts - About 1 hr to fix

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

                                protected test () {
                                  it('toggles like', async () => {
                                    const broadcastMock = this.mock(socketService, 'broadcast')
                                    const playable = factory('song', { liked: false })
                                    this.renderComponent(playable)
                              Severity: Minor
                              Found in resources/assets/js/remote/components/RemoteFooter.spec.ts - About 1 hr to fix

                                Method __invoke has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function __invoke(
                                        ITunesService $iTunesService,
                                        SettingRepository $settingRepository,
                                        SongRepository $songRepository,
                                        PlaylistRepository $playlistRepository,
                                Severity: Minor
                                Found in app/Http/Controllers/API/FetchInitialDataController.php - About 1 hr to fix

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

                                    init (mediaElement: HTMLMediaElement) {
                                      this.element = mediaElement
                                  
                                      this.context = new AudioContext()
                                      this.preampGainNode = this.context.createGain()
                                  Severity: Minor
                                  Found in resources/assets/js/services/audioService.ts - About 1 hr to fix

                                    Method up has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function up(): void
                                        {
                                            Schema::create('playlist_playlist_folder', static function (Blueprint $table): void {
                                                $table->string('folder_id', 36)->nullable(false);
                                                $table->string('playlist_id', 36)->nullable(false);

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

                                        protected test () {
                                          it('sets and gets a value', () => {
                                            cache.set('foo', 'bar')
                                            expect(cache.get('foo')).toBe('bar')
                                          })
                                      Severity: Minor
                                      Found in resources/assets/js/services/cache.spec.ts - About 1 hr to fix

                                        Function test has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          protected test () {
                                            it('downloads', async () => {
                                              const downloadMock = this.mock(downloadService, 'fromAlbum')
                                              await this.renderComponent()
                                        
                                        
                                        Severity: Minor
                                        Found in resources/assets/js/components/screens/AlbumScreen.spec.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language