Takumon/mean-blog

View on GitHub
src/app/state/article.actions.ts

Summary

Maintainability
D
2 days
Test Coverage

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

export class AddVoteOfArticlesSuccess implements Action {
  readonly type = ArticleActionTypes.AddVoteOfArticlesSuccess;

  constructor(public payload: {
    _idOfArticle: string,
Severity: Major
Found in src/app/state/article.actions.ts and 1 other location - About 1 hr to fix
src/app/state/article.actions.ts on lines 226..233

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

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 class UpsertArticles implements Action {
  readonly type = ArticleActionTypes.UpsertArticles;

  constructor(public payload: { articles: ArticleModel[] | ArticleWithUserModel[] }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 1 other location - About 1 hr to fix
src/app/state/article.actions.ts on lines 134..138

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

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 class AddArticles implements Action {
  readonly type = ArticleActionTypes.AddArticles;

  constructor(public payload: { articles: ArticleModel[] | ArticleWithUserModel[] }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 1 other location - About 1 hr to fix
src/app/state/article.actions.ts on lines 140..144

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

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 class DeleteVoteOfArticlesSuccess implements Action {
  readonly type = ArticleActionTypes.DeleteVoteOfArticlesSuccess;

  constructor(public payload: {
    _idOfArticle: string,
Severity: Major
Found in src/app/state/article.actions.ts and 1 other location - About 1 hr to fix
src/app/state/article.actions.ts on lines 199..206

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

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

export class UpdateArticle implements Action {
  readonly type = ArticleActionTypes.UpdateArticle;

  constructor(public payload: { article: Update<ArticleModel> }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 3 other locations - About 55 mins to fix
src/app/drafts/state/draft.actions.ts on lines 98..102
src/app/drafts/state/draft.actions.ts on lines 104..108
src/app/state/article.actions.ts on lines 152..156

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

export class UpdateArticleSuccess implements Action {
  readonly type = ArticleActionTypes.UpdateArticleSuccess;

  constructor(public payload: { article: Update<ArticleModel> }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 3 other locations - About 55 mins to fix
src/app/drafts/state/draft.actions.ts on lines 98..102
src/app/drafts/state/draft.actions.ts on lines 104..108
src/app/state/article.actions.ts on lines 146..150

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

export class DeleteVoteOfArticles implements Action {
  readonly type = ArticleActionTypes.DeleteVoteOfArticles;

  constructor(public payload: {
    _idOfArticle: string,
Severity: Minor
Found in src/app/state/article.actions.ts and 1 other location - About 45 mins to fix
src/app/state/article.actions.ts on lines 190..197

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

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

export class AddVoteOfArticles implements Action {
  readonly type = ArticleActionTypes.AddVoteOfArticles;

  constructor(public payload: {
    _idOfArticle: string,
Severity: Minor
Found in src/app/state/article.actions.ts and 1 other location - About 45 mins to fix
src/app/state/article.actions.ts on lines 216..223

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

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

export class AddVoteSuccess implements Action {
  readonly type = ArticleActionTypes.AddVoteSuccess;

  constructor(public payload: {
    vote: UserModel[]
Severity: Major
Found in src/app/state/article.actions.ts and 4 other locations - About 40 mins to fix
src/app/drafts/state/draft.actions.ts on lines 48..52
src/app/drafts/state/draft.actions.ts on lines 86..90
src/app/drafts/state/draft.actions.ts on lines 92..96
src/app/state/article.actions.ts on lines 313..319

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

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

export class DeleteVoteSuccess implements Action {
  readonly type = ArticleActionTypes.DeleteVoteSuccess;

  constructor(public payload: {
    vote: UserModel[]
Severity: Major
Found in src/app/state/article.actions.ts and 4 other locations - About 40 mins to fix
src/app/drafts/state/draft.actions.ts on lines 48..52
src/app/drafts/state/draft.actions.ts on lines 86..90
src/app/drafts/state/draft.actions.ts on lines 92..96
src/app/state/article.actions.ts on lines 288..294

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

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 class AddVote implements Action {
  readonly type = ArticleActionTypes.AddVote;

  constructor(public payload: {
    _idOfVoter: string
Severity: Minor
Found in src/app/state/article.actions.ts and 1 other location - About 35 mins to fix
src/app/state/article.actions.ts on lines 304..310

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

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

export class LoadArticleSuccess implements Action {
  readonly type = ArticleActionTypes.LoadArticleSuccess;

  constructor(public payload: {
    article: ArticleWithUserModel
Severity: Major
Found in src/app/state/article.actions.ts and 7 other locations - About 35 mins to fix
src/app/drafts/state/draft.actions.ts on lines 61..65
src/app/drafts/state/draft.actions.ts on lines 67..71
src/app/drafts/state/draft.actions.ts on lines 80..84
src/app/drafts/state/draft.actions.ts on lines 129..133
src/app/state/article.actions.ts on lines 110..114
src/app/state/article.actions.ts on lines 116..120
src/app/state/article.actions.ts on lines 265..269

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

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

export class AddArticleSuccess implements Action {
  readonly type = ArticleActionTypes.AddArticleSuccess;

  constructor(public payload: { article: ArticleModel }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 7 other locations - About 35 mins to fix
src/app/drafts/state/draft.actions.ts on lines 61..65
src/app/drafts/state/draft.actions.ts on lines 67..71
src/app/drafts/state/draft.actions.ts on lines 80..84
src/app/drafts/state/draft.actions.ts on lines 129..133
src/app/state/article.actions.ts on lines 68..74
src/app/state/article.actions.ts on lines 110..114
src/app/state/article.actions.ts on lines 265..269

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

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

export class DeleteArticleSuccess implements Action {
  readonly type = ArticleActionTypes.DeleteArticleSuccess;

  constructor(public payload: { article: ArticleModel }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 7 other locations - About 35 mins to fix
src/app/drafts/state/draft.actions.ts on lines 61..65
src/app/drafts/state/draft.actions.ts on lines 67..71
src/app/drafts/state/draft.actions.ts on lines 80..84
src/app/drafts/state/draft.actions.ts on lines 129..133
src/app/state/article.actions.ts on lines 68..74
src/app/state/article.actions.ts on lines 110..114
src/app/state/article.actions.ts on lines 116..120

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

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 class DeleteVote implements Action {
  readonly type = ArticleActionTypes.DeleteVote;

  constructor(public payload: {
    _idOfVoter: string
Severity: Minor
Found in src/app/state/article.actions.ts and 1 other location - About 35 mins to fix
src/app/state/article.actions.ts on lines 279..285

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

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

export class DeleteVoteOfArticlesFail implements Action {
  readonly type = ArticleActionTypes.DeleteVoteOfArticlesFail;

  constructor(public payload: {error: any}) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 3 other locations - About 35 mins to fix
src/app/state/article.actions.ts on lines 208..212
src/app/state/article.actions.ts on lines 271..275
src/app/state/article.actions.ts on lines 296..300

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

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

export class AddArticle implements Action {
  readonly type = ArticleActionTypes.AddArticle;

  constructor(public payload: { article: ArticleModel }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 7 other locations - About 35 mins to fix
src/app/drafts/state/draft.actions.ts on lines 61..65
src/app/drafts/state/draft.actions.ts on lines 67..71
src/app/drafts/state/draft.actions.ts on lines 80..84
src/app/drafts/state/draft.actions.ts on lines 129..133
src/app/state/article.actions.ts on lines 68..74
src/app/state/article.actions.ts on lines 116..120
src/app/state/article.actions.ts on lines 265..269

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

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

export class AddVoteOfArticlesFail implements Action {
  readonly type = ArticleActionTypes.AddVoteOfArticlesFail;

  constructor(public payload: {error: any}) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 3 other locations - About 35 mins to fix
src/app/state/article.actions.ts on lines 235..239
src/app/state/article.actions.ts on lines 271..275
src/app/state/article.actions.ts on lines 296..300

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

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

export class AddVoteFail implements Action {
  readonly type = ArticleActionTypes.AddVoteFail;

  constructor(public payload: {error: any}) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 3 other locations - About 35 mins to fix
src/app/state/article.actions.ts on lines 208..212
src/app/state/article.actions.ts on lines 235..239
src/app/state/article.actions.ts on lines 271..275

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

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

export class DeleteArticleFail implements Action {
  readonly type = ArticleActionTypes.DeleteArticleFail;

  constructor(public payload: { error: any }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 3 other locations - About 35 mins to fix
src/app/state/article.actions.ts on lines 208..212
src/app/state/article.actions.ts on lines 235..239
src/app/state/article.actions.ts on lines 296..300

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

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 class DeleteArticles implements Action {
  readonly type = ArticleActionTypes.DeleteArticles;

  constructor(public payload: { ids: string[] }) {}
}
Severity: Minor
Found in src/app/state/article.actions.ts and 1 other location - About 35 mins to fix
src/app/drafts/state/draft.actions.ts on lines 141..145

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

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

export class LoadArticleFail implements Action {
  readonly type = ArticleActionTypes.LoadArticleFail;

  constructor(public payload?: { error: any }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 8 other locations - About 30 mins to fix
src/app/drafts/state/draft.actions.ts on lines 55..59
src/app/drafts/state/draft.actions.ts on lines 73..77
src/app/drafts/state/draft.actions.ts on lines 110..114
src/app/drafts/state/draft.actions.ts on lines 135..139
src/app/state/article.actions.ts on lines 104..108
src/app/state/article.actions.ts on lines 122..126
src/app/state/article.actions.ts on lines 158..162
src/app/state/article.actions.ts on lines 321..325

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

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

export class AddArticleFail implements Action {
  readonly type = ArticleActionTypes.AddArticleFail;

  constructor(public payload: { error: any }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 8 other locations - About 30 mins to fix
src/app/drafts/state/draft.actions.ts on lines 55..59
src/app/drafts/state/draft.actions.ts on lines 73..77
src/app/drafts/state/draft.actions.ts on lines 110..114
src/app/drafts/state/draft.actions.ts on lines 135..139
src/app/state/article.actions.ts on lines 76..80
src/app/state/article.actions.ts on lines 104..108
src/app/state/article.actions.ts on lines 158..162
src/app/state/article.actions.ts on lines 321..325

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

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

export class UpdateArticleFail implements Action {
  readonly type = ArticleActionTypes.UpdateArticleFail;

  constructor(public payload: { error: any }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 8 other locations - About 30 mins to fix
src/app/drafts/state/draft.actions.ts on lines 55..59
src/app/drafts/state/draft.actions.ts on lines 73..77
src/app/drafts/state/draft.actions.ts on lines 110..114
src/app/drafts/state/draft.actions.ts on lines 135..139
src/app/state/article.actions.ts on lines 76..80
src/app/state/article.actions.ts on lines 104..108
src/app/state/article.actions.ts on lines 122..126
src/app/state/article.actions.ts on lines 321..325

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

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

export class DeleteVoteFail implements Action {
  readonly type = ArticleActionTypes.DeleteVoteFail;

  constructor(public payload: {error: any}) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 8 other locations - About 30 mins to fix
src/app/drafts/state/draft.actions.ts on lines 55..59
src/app/drafts/state/draft.actions.ts on lines 73..77
src/app/drafts/state/draft.actions.ts on lines 110..114
src/app/drafts/state/draft.actions.ts on lines 135..139
src/app/state/article.actions.ts on lines 76..80
src/app/state/article.actions.ts on lines 104..108
src/app/state/article.actions.ts on lines 122..126
src/app/state/article.actions.ts on lines 158..162

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

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

export class LoadArticlesFail implements Action {
  readonly type = ArticleActionTypes.LoadArticlesFail;

  constructor(public payload?: { error: any }) {}
}
Severity: Major
Found in src/app/state/article.actions.ts and 8 other locations - About 30 mins to fix
src/app/drafts/state/draft.actions.ts on lines 55..59
src/app/drafts/state/draft.actions.ts on lines 73..77
src/app/drafts/state/draft.actions.ts on lines 110..114
src/app/drafts/state/draft.actions.ts on lines 135..139
src/app/state/article.actions.ts on lines 76..80
src/app/state/article.actions.ts on lines 122..126
src/app/state/article.actions.ts on lines 158..162
src/app/state/article.actions.ts on lines 321..325

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

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

There are no issues that match your filters.

Category
Status