Showing 134 of 387 total issues
Method up
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
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()
Function test
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)
Function test
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('creates invite link', async () => {
const playlist = factory('playlist', { is_smart: false })
const postMock = this.mock(http, 'post').mockResolvedValue({ token: 'abc123' })
Function test
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
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))
Function test
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('accepts an invitation', async () => {
const postMock = this.mock(http, 'post').mockResolvedValue({
'audio-token': 'my-audio-token',
'token': 'my-token',
Function test
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('creates playlist with no playables', async () => {
const folder = factory('playlist-folder')
const storeMock = this.mock(playlistStore, 'store').mockResolvedValue(factory('playlist'))
Function test
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
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.'))
Method fromGetId3Info
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
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', []),
Function setup
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const setup = () => {
const referenceElement = extractRef(reference)
const floatingElement = extractRef(floating)
floatingElement.style.display = 'none'
Function init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Function test
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('performs an excerpt search', async () => {
const result: ExcerptSearchResult = {
playables: factory('song', 3),
albums: factory('album', 3),
Function test
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('invites single email', async () => {
const inviteMock = this.mock(invitationService, 'invite')
const alertMock = this.mock(MessageToasterStub.value, 'success')
Function test
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('renders the playlist', async () => {
await this.renderComponent(factory('song', 10))
await waitFor(() => {
Function test
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('toggles like', async () => {
const broadcastMock = this.mock(socketService, 'broadcast')
const playable = factory('song', { liked: false })
this.renderComponent(playable)
Method __invoke
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __invoke(
ITunesService $iTunesService,
SettingRepository $settingRepository,
SongRepository $songRepository,
PlaylistRepository $playlistRepository,
Function init
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init (mediaElement: HTMLMediaElement) {
this.element = mediaElement
this.context = new AudioContext()
this.preampGainNode = this.context.createGain()
Method up
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Open
protected test () {
it('sets and gets a value', () => {
cache.set('foo', 'bar')
expect(cache.get('foo')).toBe('bar')
})
Function test
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected test () {
it('downloads', async () => {
const downloadMock = this.mock(downloadService, 'fromAlbum')
await this.renderComponent()