Showing 52 of 71 total issues

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

export type CreatePostRequest = {
  text: string
  reply_to?: string
  is_nsfw?: boolean
  entities?: {
Severity: Major
Found in src/plugins/domain/dto/post.ts and 1 other location - About 1 hr to fix
src/plugins/domain/dto/message.ts on lines 18..26

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

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

export function getPollFixture(attrs?: Parameters<IFactory<Poll>['build']>[0]) {
  return typeMap.poll.build(attrs)
}
Severity: Major
Found in src/fixtures/index.ts and 1 other location - About 1 hr to fix
src/fixtures/index.ts on lines 14..16

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

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 3 locations. Consider refactoring.
Open

  createChannel(
    createChannelRequest: CreateChannelRequest,
    params?: GeneralChannelParameters
  ): Promise<PnutResponse<Channel>> {
    return this.post('/channels', createChannelRequest, params)
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 2 other locations - About 55 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 243..252
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 301..306

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

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 3 locations. Consider refactoring.
Open

  createPost(
    createPostRequest: CreatePostRequest,
    params?: GeneralPostParameters
  ): Promise<PnutResponse<Post>> {
    return this.post('/posts', createPostRequest, params)
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 2 other locations - About 55 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 243..252
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 254..259

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

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 3 locations. Consider refactoring.
Open

  createPrivateChannel(
    createPrivateChannelRequest: CreatePrivateChannelRequest,
    params?: GeneralChannelParameters
  ): Promise<PnutResponse<Message>> {
    return this.post(
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 2 other locations - About 55 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 254..259
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 301..306

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

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 7 locations. Consider refactoring.
Open

  getPolls(
    params?: GeneralPollParameters & Pagination
  ): Promise<PnutResponse<Poll[]>> {
    return this.get('/users/me/polls', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 107..111
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 133..137
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 146..150
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 156..160
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 162..166
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 181..185

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

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 7 locations. Consider refactoring.
Open

  getBlockedUsers(
    params?: GeneralChannelParameters & Pagination
  ): Promise<PnutResponse<User[]>> {
    return this.get('/users/me/blocked', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 107..111
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 127..131
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 133..137
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 146..150
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 156..160
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 181..185

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

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 7 locations. Consider refactoring.
Open

  getChannels(
    params?: GeneralChannelParameters & ConnectionParameters
  ): Promise<PnutResponse<Channel[]>> {
    return this.get('/channels', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 127..131
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 133..137
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 146..150
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 156..160
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 162..166
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 181..185

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

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 7 locations. Consider refactoring.
Open

  getSubscribedChannels(
    params?: GeneralChannelParameters & ConnectionParameters
  ): Promise<PnutResponse<Channel[]>> {
    return this.get('/users/me/channels/subscribed', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 107..111
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 127..131
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 133..137
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 146..150
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 156..160
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 162..166

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

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 7 locations. Consider refactoring.
Open

  getFiles(
    params?: GeneralFileParameters & Pagination
  ): Promise<PnutResponse<PnutFile[]>> {
    return this.get('/users/me/files', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 107..111
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 127..131
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 146..150
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 156..160
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 162..166
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 181..185

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

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 7 locations. Consider refactoring.
Open

  searchPosts(
    params?: SearchPostRequest & Pagination
  ): Promise<PnutResponse<Post[]>> {
    return this.get('/posts/search', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 107..111
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 127..131
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 133..137
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 156..160
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 162..166
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 181..185

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

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 7 locations. Consider refactoring.
Open

  getMutedUsers(
    params?: GeneralChannelParameters & Pagination
  ): Promise<PnutResponse<User[]>> {
    return this.get('/users/me/muted', params)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 6 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 107..111
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 127..131
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 133..137
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 146..150
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 162..166
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 181..185

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

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 6 locations. Consider refactoring.
Open

  unblock(userId: string): Promise<PnutResponse<User>> {
    return this.delete(`/users/${userId}/block`)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 5 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 73..75
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 81..83
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 85..87
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 89..91
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 93..95

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

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 6 locations. Consider refactoring.
Open

  follow(userId: string): Promise<PnutResponse<User>> {
    return this.put(`/users/${userId}/follow`)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 5 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 73..75
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 77..79
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 81..83
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 85..87
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 93..95

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

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 6 locations. Consider refactoring.
Open

  block(userId: string): Promise<PnutResponse<User>> {
    return this.put(`/users/${userId}/block`)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 5 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 77..79
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 81..83
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 85..87
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 89..91
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 93..95

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

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 6 locations. Consider refactoring.
Open

  mute(userId: string): Promise<PnutResponse<User>> {
    return this.put(`/users/${userId}/mute`)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 5 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 73..75
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 77..79
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 85..87
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 89..91
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 93..95

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

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 6 locations. Consider refactoring.
Open

  unmute(userId: string): Promise<PnutResponse<User>> {
    return this.delete(`/users/${userId}/mute`)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 5 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 73..75
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 77..79
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 81..83
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 89..91
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 93..95

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

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 6 locations. Consider refactoring.
Open

  unfollow(userId: string): Promise<PnutResponse<User>> {
    return this.delete(`/users/${userId}/follow`)
  }
Severity: Major
Found in src/plugins/infrastructure/repository/pnutRepositoryImpl.ts and 5 other locations - About 50 mins to fix
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 73..75
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 77..79
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 81..83
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 85..87
src/plugins/infrastructure/repository/pnutRepositoryImpl.ts on lines 89..91

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

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

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

  constructor(
    @inject(PnutRepository.token)
    private readonly pnutRepository: PnutRepository,
    @inject(ConfigRepository.token)
    private readonly configRepository: ConfigRepository
Severity: Minor
Found in src/plugins/domain/usecases/createConnection.ts and 1 other location - About 45 mins to fix
src/plugins/domain/usecases/getPosts.ts on lines 29..34

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

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

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

  constructor(
    @inject(PnutRepository.token)
    private readonly pnutRepository: PnutRepository,
    @inject(ConfigRepository.token)
    private readonly configRepository: ConfigRepository
Severity: Minor
Found in src/plugins/domain/usecases/getPosts.ts and 1 other location - About 45 mins to fix
src/plugins/domain/usecases/createConnection.ts on lines 61..66

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

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