Showing 134 of 387 total issues

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

  protected test () {
    it('functions', async () => {
      const song = factory('song')

      const searchMock = this.mock(youTubeService, 'searchVideosBySong').mockResolvedValueOnce({
Severity: Minor
Found in resources/assets/js/components/ui/youtube/YouTubeVideoList.spec.ts - About 1 hr to fix

    Function showNotification has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      public showNotification (playable: Playable) {
        if (!isSong(playable) && !isEpisode(playable)) {
          throw new Error('Invalid playable type.')
        }
    
    
    Severity: Minor
    Found in resources/assets/js/services/playbackService.ts - About 1 hr to fix

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

        protected test () {
          it('downloads playables', () => {
            const mock = this.mock(downloadService, 'trigger')
            downloadService.fromPlayables([factory('song', { id: 'bar' })])
      
      
      Severity: Minor
      Found in resources/assets/js/services/downloadService.spec.ts - About 1 hr to fix

        Function update has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          update () {
            this.analyzer.getByteFrequencyData(this.audioBuffer)
            let bass = 0.0; let mid = 0.0; let high = 0.0
        
            if (this.audioBuffer[0] === 0) {
        Severity: Minor
        Found in resources/assets/js/visualizers/asteroid/scripts/AudioAnalyzer.ts - About 1 hr to fix

          Function timeUpdateHandler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              let timeUpdateHandler = () => {
                const currentPlayable = queueStore.current
          
                if (!currentPlayable) {
                  return
          Severity: Minor
          Found in resources/assets/js/services/playbackService.ts - About 1 hr to fix

            Method handle has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function handle(): int
                {
                    if (PHP_OS_FAMILY === 'Windows' || PHP_OS_FAMILY === 'Unknown') {
                        $this->components->error('This command is only available on Linux systems.');
            
            
            Severity: Minor
            Found in app/Console/Commands/DoctorCommand.php - About 1 hr to fix

              Function initScene has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                initScene () {
                  const _sphere_size = 0.7
                  const _geom = new THREE.SphereGeometry(_sphere_size, 128, 128)
                  const _geom_lowres = new THREE.SphereGeometry(_sphere_size, 64, 64)
              
              
              Severity: Minor
              Found in resources/assets/js/visualizers/asteroid/scripts/NoiseBlob.ts - About 1 hr to fix

                Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        public ?string $title,
                        public ?string $artistName,
                        public ?string $albumName,
                        public ?string $albumArtistName,
                        public ?int $track,
                Severity: Major
                Found in app/Values/SongUpdateData.php - About 1 hr to fix

                  Method make has 9 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          ?string $title,
                          ?string $artistName,
                          ?string $albumName,
                          ?string $albumArtistName,
                          ?int $track,
                  Severity: Major
                  Found in app/Values/SongUpdateData.php - About 1 hr to fix

                    Function resolveDroppedItems has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const resolveDroppedItems = async (event: DragEvent) => {
                        try {
                          const type = getDragType(event)
                          if (!type) {
                            return <Playable[]>[]
                    Severity: Minor
                    Found in resources/assets/js/composables/useDragAndDrop.ts - About 1 hr to fix

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

                        protected test () {
                          it('renders', () => expect(this.renderComponent().html()).toMatchSnapshot())
                      
                          it('downloads', async () => {
                            const mock = this.mock(downloadService, 'fromAlbum')
                      Severity: Minor
                      Found in resources/assets/js/components/album/AlbumCard.spec.ts - About 1 hr to fix

                        Function useErrorHandler has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const useErrorHandler = (driver: ErrorMessageDriver = 'toast') => {
                          const { toastError } = useMessageToaster()
                          const { showErrorDialog } = useDialogBox()
                        
                          const showError = (message: string) => driver === 'toast' ? toastError(message) : showErrorDialog(message)
                        Severity: Minor
                        Found in resources/assets/js/composables/useErrorHandler.ts - About 1 hr to fix

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

                            protected test () {
                              it('renders', async () => {
                                const [{ html }] = await this.renderComponent()
                                await waitFor(() => expect(html()).toMatchSnapshot())
                              })
                          Severity: Minor
                          Found in resources/assets/js/components/screens/AllSongsScreen.spec.ts - About 1 hr to fix

                            Function upload has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              async upload (file: UploadFile) {
                                if (file.status === 'Uploading') {
                                  return
                                }
                            
                            
                            Severity: Minor
                            Found in resources/assets/js/services/uploadService.ts - About 1 hr to fix

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

                                protected test () {
                                  it('renders', async () => {
                                    const song = factory('song', {
                                      title: 'Test Song',
                                      album_name: 'Test Album',
                              Severity: Minor
                              Found in resources/assets/js/components/song/SongListItem.spec.ts - About 1 hr to fix

                                Function renderComponent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  private async renderComponent () {
                                    commonStore.state.uses_last_fm = true
                                
                                    album = factory('album', {
                                      id: 42,
                                Severity: Minor
                                Found in resources/assets/js/components/screens/AlbumScreen.spec.ts - About 1 hr to fix

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

                                    protected test () {
                                      it('renders an empty state if no songs found', async () => {
                                        commonStore.state.song_length = 0
                                        this.mock(overviewStore, 'fetch')
                                  
                                  
                                  Severity: Minor
                                  Found in resources/assets/js/components/screens/HomeScreen.spec.ts - About 1 hr to fix

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

                                      protected test () {
                                        it('renders', () => expect(this.renderComponent().html()).toMatchSnapshot())
                                    
                                        it('downloads', async () => {
                                          const mock = this.mock(downloadService, 'fromArtist')
                                    Severity: Minor
                                    Found in resources/assets/js/components/artist/ArtistCard.spec.ts - About 1 hr to fix

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

                                        protected test () {
                                          it('renders the queue', () => {
                                            this.renderComponent(factory('song', 3))
                                      
                                            expect(screen.queryByTestId('song-list')).toBeTruthy()
                                      Severity: Minor
                                      Found in resources/assets/js/components/screens/QueueScreen.spec.ts - About 1 hr to fix

                                        Function renderComponent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          private async renderComponent (genre?: Genre, songs?: Song[]) {
                                            genre = genre || factory('genre')
                                        
                                            const fetchGenreMock = this.mock(genreStore, 'fetchOne').mockResolvedValue(genre)
                                            const paginateMock = this.mock(songStore, 'paginateForGenre').mockResolvedValue({
                                        Severity: Minor
                                        Found in resources/assets/js/components/screens/GenreScreen.spec.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language