HabitRPG/habitrpg

View on GitHub
website/common/script/content/quests/potions.js

Summary

Maintainability
F
1 wk
Test Coverage

File potions.js has 376 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import t from '../translation';

const QUEST_POTIONS = {
  amber: {
    text: t('questAmberText'),
Severity: Minor
Found in website/common/script/content/quests/potions.js - About 5 hrs to fix

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

      pinkMarble: {
        text: t('questPinkMarbleText'),
        notes: t('questPinkMarbleNotes'),
        completion: t('questPinkMarbleCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 1 other location - About 1 day to fix
    website/common/script/content/quests/pets.js on lines 68..106

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

    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

      ruby: {
        text: t('questRubyText'),
        notes: t('questRubyNotes'),
        completion: t('questRubyCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 4 other locations - About 1 day to fix
    website/common/script/content/quests/potions.js on lines 132..172
    website/common/script/content/quests/potions.js on lines 253..293
    website/common/script/content/quests/potions.js on lines 294..334
    website/common/script/content/quests/potions.js on lines 335..375

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

    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

      silver: {
        text: t('questSilverText'),
        notes: t('questSilverNotes'),
        completion: t('questSilverCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 4 other locations - About 1 day to fix
    website/common/script/content/quests/potions.js on lines 132..172
    website/common/script/content/quests/potions.js on lines 212..252
    website/common/script/content/quests/potions.js on lines 294..334
    website/common/script/content/quests/potions.js on lines 335..375

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

    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

      onyx: {
        text: t('questOnyxText'),
        notes: t('questOnyxNotes'),
        completion: t('questOnyxCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 4 other locations - About 1 day to fix
    website/common/script/content/quests/potions.js on lines 212..252
    website/common/script/content/quests/potions.js on lines 253..293
    website/common/script/content/quests/potions.js on lines 294..334
    website/common/script/content/quests/potions.js on lines 335..375

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

    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

      stone: {
        text: t('questStoneText'),
        notes: t('questStoneNotes'),
        completion: t('questStoneCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 4 other locations - About 1 day to fix
    website/common/script/content/quests/potions.js on lines 132..172
    website/common/script/content/quests/potions.js on lines 212..252
    website/common/script/content/quests/potions.js on lines 253..293
    website/common/script/content/quests/potions.js on lines 335..375

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

    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

      turquoise: {
        text: t('questTurquoiseText'),
        notes: t('questTurquoiseNotes'),
        completion: t('questTurquoiseCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 4 other locations - About 1 day to fix
    website/common/script/content/quests/potions.js on lines 132..172
    website/common/script/content/quests/potions.js on lines 212..252
    website/common/script/content/quests/potions.js on lines 253..293
    website/common/script/content/quests/potions.js on lines 294..334

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

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

      amber: {
        text: t('questAmberText'),
        notes: t('questAmberNotes'),
        completion: t('questAmberCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 50 other locations - About 6 hrs to fix
    website/common/script/content/quests/pets.js on lines 4..35
    website/common/script/content/quests/pets.js on lines 36..67
    website/common/script/content/quests/pets.js on lines 107..138
    website/common/script/content/quests/pets.js on lines 139..170
    website/common/script/content/quests/pets.js on lines 171..202
    website/common/script/content/quests/pets.js on lines 203..234
    website/common/script/content/quests/pets.js on lines 235..266
    website/common/script/content/quests/pets.js on lines 267..298
    website/common/script/content/quests/pets.js on lines 331..362
    website/common/script/content/quests/pets.js on lines 363..394
    website/common/script/content/quests/pets.js on lines 395..426
    website/common/script/content/quests/pets.js on lines 427..458
    website/common/script/content/quests/pets.js on lines 491..522
    website/common/script/content/quests/pets.js on lines 523..554
    website/common/script/content/quests/pets.js on lines 555..586
    website/common/script/content/quests/pets.js on lines 587..618
    website/common/script/content/quests/pets.js on lines 619..650
    website/common/script/content/quests/pets.js on lines 651..682
    website/common/script/content/quests/pets.js on lines 683..714
    website/common/script/content/quests/pets.js on lines 715..746
    website/common/script/content/quests/pets.js on lines 747..778
    website/common/script/content/quests/pets.js on lines 779..810
    website/common/script/content/quests/pets.js on lines 811..842
    website/common/script/content/quests/pets.js on lines 843..874
    website/common/script/content/quests/pets.js on lines 875..906
    website/common/script/content/quests/pets.js on lines 907..938
    website/common/script/content/quests/pets.js on lines 939..970
    website/common/script/content/quests/pets.js on lines 971..1002
    website/common/script/content/quests/pets.js on lines 1003..1034
    website/common/script/content/quests/pets.js on lines 1035..1066
    website/common/script/content/quests/pets.js on lines 1067..1098
    website/common/script/content/quests/pets.js on lines 1099..1130
    website/common/script/content/quests/pets.js on lines 1131..1162
    website/common/script/content/quests/pets.js on lines 1163..1194
    website/common/script/content/quests/pets.js on lines 1195..1226
    website/common/script/content/quests/pets.js on lines 1227..1258
    website/common/script/content/quests/pets.js on lines 1259..1290
    website/common/script/content/quests/pets.js on lines 1291..1322
    website/common/script/content/quests/pets.js on lines 1323..1354
    website/common/script/content/quests/pets.js on lines 1355..1386
    website/common/script/content/quests/pets.js on lines 1387..1418
    website/common/script/content/quests/pets.js on lines 1458..1489
    website/common/script/content/quests/pets.js on lines 1490..1521
    website/common/script/content/quests/pets.js on lines 1522..1553
    website/common/script/content/quests/pets.js on lines 1554..1585
    website/common/script/content/quests/pets.js on lines 1586..1617
    website/common/script/content/quests/pets.js on lines 1618..1649
    website/common/script/content/quests/potions.js on lines 36..67
    website/common/script/content/quests/potions.js on lines 68..99
    website/common/script/content/quests/potions.js on lines 100..131

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

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

      fluorite: {
        text: t('questFluoriteText'),
        notes: t('questFluoriteNotes'),
        completion: t('questFluoriteCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 50 other locations - About 6 hrs to fix
    website/common/script/content/quests/pets.js on lines 4..35
    website/common/script/content/quests/pets.js on lines 36..67
    website/common/script/content/quests/pets.js on lines 107..138
    website/common/script/content/quests/pets.js on lines 139..170
    website/common/script/content/quests/pets.js on lines 171..202
    website/common/script/content/quests/pets.js on lines 203..234
    website/common/script/content/quests/pets.js on lines 235..266
    website/common/script/content/quests/pets.js on lines 267..298
    website/common/script/content/quests/pets.js on lines 331..362
    website/common/script/content/quests/pets.js on lines 363..394
    website/common/script/content/quests/pets.js on lines 395..426
    website/common/script/content/quests/pets.js on lines 427..458
    website/common/script/content/quests/pets.js on lines 491..522
    website/common/script/content/quests/pets.js on lines 523..554
    website/common/script/content/quests/pets.js on lines 555..586
    website/common/script/content/quests/pets.js on lines 587..618
    website/common/script/content/quests/pets.js on lines 619..650
    website/common/script/content/quests/pets.js on lines 651..682
    website/common/script/content/quests/pets.js on lines 683..714
    website/common/script/content/quests/pets.js on lines 715..746
    website/common/script/content/quests/pets.js on lines 747..778
    website/common/script/content/quests/pets.js on lines 779..810
    website/common/script/content/quests/pets.js on lines 811..842
    website/common/script/content/quests/pets.js on lines 843..874
    website/common/script/content/quests/pets.js on lines 875..906
    website/common/script/content/quests/pets.js on lines 907..938
    website/common/script/content/quests/pets.js on lines 939..970
    website/common/script/content/quests/pets.js on lines 971..1002
    website/common/script/content/quests/pets.js on lines 1003..1034
    website/common/script/content/quests/pets.js on lines 1035..1066
    website/common/script/content/quests/pets.js on lines 1067..1098
    website/common/script/content/quests/pets.js on lines 1099..1130
    website/common/script/content/quests/pets.js on lines 1131..1162
    website/common/script/content/quests/pets.js on lines 1163..1194
    website/common/script/content/quests/pets.js on lines 1195..1226
    website/common/script/content/quests/pets.js on lines 1227..1258
    website/common/script/content/quests/pets.js on lines 1259..1290
    website/common/script/content/quests/pets.js on lines 1291..1322
    website/common/script/content/quests/pets.js on lines 1323..1354
    website/common/script/content/quests/pets.js on lines 1355..1386
    website/common/script/content/quests/pets.js on lines 1387..1418
    website/common/script/content/quests/pets.js on lines 1458..1489
    website/common/script/content/quests/pets.js on lines 1490..1521
    website/common/script/content/quests/pets.js on lines 1522..1553
    website/common/script/content/quests/pets.js on lines 1554..1585
    website/common/script/content/quests/pets.js on lines 1586..1617
    website/common/script/content/quests/pets.js on lines 1618..1649
    website/common/script/content/quests/potions.js on lines 4..35
    website/common/script/content/quests/potions.js on lines 36..67
    website/common/script/content/quests/potions.js on lines 68..99

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

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

      blackPearl: {
        text: t('questBlackPearlText'),
        notes: t('questBlackPearlNotes'),
        completion: t('questBlackPearlCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 50 other locations - About 6 hrs to fix
    website/common/script/content/quests/pets.js on lines 4..35
    website/common/script/content/quests/pets.js on lines 36..67
    website/common/script/content/quests/pets.js on lines 107..138
    website/common/script/content/quests/pets.js on lines 139..170
    website/common/script/content/quests/pets.js on lines 171..202
    website/common/script/content/quests/pets.js on lines 203..234
    website/common/script/content/quests/pets.js on lines 235..266
    website/common/script/content/quests/pets.js on lines 267..298
    website/common/script/content/quests/pets.js on lines 331..362
    website/common/script/content/quests/pets.js on lines 363..394
    website/common/script/content/quests/pets.js on lines 395..426
    website/common/script/content/quests/pets.js on lines 427..458
    website/common/script/content/quests/pets.js on lines 491..522
    website/common/script/content/quests/pets.js on lines 523..554
    website/common/script/content/quests/pets.js on lines 555..586
    website/common/script/content/quests/pets.js on lines 587..618
    website/common/script/content/quests/pets.js on lines 619..650
    website/common/script/content/quests/pets.js on lines 651..682
    website/common/script/content/quests/pets.js on lines 683..714
    website/common/script/content/quests/pets.js on lines 715..746
    website/common/script/content/quests/pets.js on lines 747..778
    website/common/script/content/quests/pets.js on lines 779..810
    website/common/script/content/quests/pets.js on lines 811..842
    website/common/script/content/quests/pets.js on lines 843..874
    website/common/script/content/quests/pets.js on lines 875..906
    website/common/script/content/quests/pets.js on lines 907..938
    website/common/script/content/quests/pets.js on lines 939..970
    website/common/script/content/quests/pets.js on lines 971..1002
    website/common/script/content/quests/pets.js on lines 1003..1034
    website/common/script/content/quests/pets.js on lines 1035..1066
    website/common/script/content/quests/pets.js on lines 1067..1098
    website/common/script/content/quests/pets.js on lines 1099..1130
    website/common/script/content/quests/pets.js on lines 1131..1162
    website/common/script/content/quests/pets.js on lines 1163..1194
    website/common/script/content/quests/pets.js on lines 1195..1226
    website/common/script/content/quests/pets.js on lines 1227..1258
    website/common/script/content/quests/pets.js on lines 1259..1290
    website/common/script/content/quests/pets.js on lines 1291..1322
    website/common/script/content/quests/pets.js on lines 1323..1354
    website/common/script/content/quests/pets.js on lines 1355..1386
    website/common/script/content/quests/pets.js on lines 1387..1418
    website/common/script/content/quests/pets.js on lines 1458..1489
    website/common/script/content/quests/pets.js on lines 1490..1521
    website/common/script/content/quests/pets.js on lines 1522..1553
    website/common/script/content/quests/pets.js on lines 1554..1585
    website/common/script/content/quests/pets.js on lines 1586..1617
    website/common/script/content/quests/pets.js on lines 1618..1649
    website/common/script/content/quests/potions.js on lines 4..35
    website/common/script/content/quests/potions.js on lines 68..99
    website/common/script/content/quests/potions.js on lines 100..131

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

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

      bronze: {
        text: t('questBronzeText'),
        notes: t('questBronzeNotes'),
        completion: t('questBronzeCompletion'),
        value: 4,
    Severity: Major
    Found in website/common/script/content/quests/potions.js and 50 other locations - About 6 hrs to fix
    website/common/script/content/quests/pets.js on lines 4..35
    website/common/script/content/quests/pets.js on lines 36..67
    website/common/script/content/quests/pets.js on lines 107..138
    website/common/script/content/quests/pets.js on lines 139..170
    website/common/script/content/quests/pets.js on lines 171..202
    website/common/script/content/quests/pets.js on lines 203..234
    website/common/script/content/quests/pets.js on lines 235..266
    website/common/script/content/quests/pets.js on lines 267..298
    website/common/script/content/quests/pets.js on lines 331..362
    website/common/script/content/quests/pets.js on lines 363..394
    website/common/script/content/quests/pets.js on lines 395..426
    website/common/script/content/quests/pets.js on lines 427..458
    website/common/script/content/quests/pets.js on lines 491..522
    website/common/script/content/quests/pets.js on lines 523..554
    website/common/script/content/quests/pets.js on lines 555..586
    website/common/script/content/quests/pets.js on lines 587..618
    website/common/script/content/quests/pets.js on lines 619..650
    website/common/script/content/quests/pets.js on lines 651..682
    website/common/script/content/quests/pets.js on lines 683..714
    website/common/script/content/quests/pets.js on lines 715..746
    website/common/script/content/quests/pets.js on lines 747..778
    website/common/script/content/quests/pets.js on lines 779..810
    website/common/script/content/quests/pets.js on lines 811..842
    website/common/script/content/quests/pets.js on lines 843..874
    website/common/script/content/quests/pets.js on lines 875..906
    website/common/script/content/quests/pets.js on lines 907..938
    website/common/script/content/quests/pets.js on lines 939..970
    website/common/script/content/quests/pets.js on lines 971..1002
    website/common/script/content/quests/pets.js on lines 1003..1034
    website/common/script/content/quests/pets.js on lines 1035..1066
    website/common/script/content/quests/pets.js on lines 1067..1098
    website/common/script/content/quests/pets.js on lines 1099..1130
    website/common/script/content/quests/pets.js on lines 1131..1162
    website/common/script/content/quests/pets.js on lines 1163..1194
    website/common/script/content/quests/pets.js on lines 1195..1226
    website/common/script/content/quests/pets.js on lines 1227..1258
    website/common/script/content/quests/pets.js on lines 1259..1290
    website/common/script/content/quests/pets.js on lines 1291..1322
    website/common/script/content/quests/pets.js on lines 1323..1354
    website/common/script/content/quests/pets.js on lines 1355..1386
    website/common/script/content/quests/pets.js on lines 1387..1418
    website/common/script/content/quests/pets.js on lines 1458..1489
    website/common/script/content/quests/pets.js on lines 1490..1521
    website/common/script/content/quests/pets.js on lines 1522..1553
    website/common/script/content/quests/pets.js on lines 1554..1585
    website/common/script/content/quests/pets.js on lines 1586..1617
    website/common/script/content/quests/pets.js on lines 1618..1649
    website/common/script/content/quests/potions.js on lines 4..35
    website/common/script/content/quests/potions.js on lines 36..67
    website/common/script/content/quests/potions.js on lines 100..131

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

    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