Showing 134 of 387 total issues
Function test
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('functions', async () => {
const song = factory('song')
const searchMock = this.mock(youTubeService, 'searchVideosBySong').mockResolvedValueOnce({
Function showNotification
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public showNotification (playable: Playable) {
if (!isSong(playable) && !isEpisode(playable)) {
throw new Error('Invalid playable type.')
}
Function test
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('downloads playables', () => {
const mock = this.mock(downloadService, 'trigger')
downloadService.fromPlayables([factory('song', { id: 'bar' })])
Function update
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
update () {
this.analyzer.getByteFrequencyData(this.audioBuffer)
let bass = 0.0; let mid = 0.0; let high = 0.0
if (this.audioBuffer[0] === 0) {
Function timeUpdateHandler
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let timeUpdateHandler = () => {
const currentPlayable = queueStore.current
if (!currentPlayable) {
return
Method handle
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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.');
Function initScene
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public ?string $title,
public ?string $artistName,
public ?string $albumName,
public ?string $albumArtistName,
public ?int $track,
Method make
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
?string $title,
?string $artistName,
?string $albumName,
?string $albumArtistName,
?int $track,
Function resolveDroppedItems
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const resolveDroppedItems = async (event: DragEvent) => {
try {
const type = getDragType(event)
if (!type) {
return <Playable[]>[]
Function test
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('renders', () => expect(this.renderComponent().html()).toMatchSnapshot())
it('downloads', async () => {
const mock = this.mock(downloadService, 'fromAlbum')
Function useErrorHandler
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useErrorHandler = (driver: ErrorMessageDriver = 'toast') => {
const { toastError } = useMessageToaster()
const { showErrorDialog } = useDialogBox()
const showError = (message: string) => driver === 'toast' ? toastError(message) : showErrorDialog(message)
Function test
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('renders', async () => {
const [{ html }] = await this.renderComponent()
await waitFor(() => expect(html()).toMatchSnapshot())
})
Function upload
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async upload (file: UploadFile) {
if (file.status === 'Uploading') {
return
}
Function test
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('renders', async () => {
const song = factory('song', {
title: 'Test Song',
album_name: 'Test Album',
Function renderComponent
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async renderComponent () {
commonStore.state.uses_last_fm = true
album = factory('album', {
id: 42,
Function test
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('renders an empty state if no songs found', async () => {
commonStore.state.song_length = 0
this.mock(overviewStore, 'fetch')
Function test
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('renders', () => expect(this.renderComponent().html()).toMatchSnapshot())
it('downloads', async () => {
const mock = this.mock(downloadService, 'fromArtist')
Function test
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('renders the queue', () => {
this.renderComponent(factory('song', 3))
expect(screen.queryByTestId('song-list')).toBeTruthy()
Function renderComponent
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
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({