wikimedia/mediawiki-extensions-Flow

View on GitHub
handlebars/compiled/flow_post.handlebars.php

Summary

Maintainability
F
1 mo
Test Coverage

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

'flow_post_author' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<span class="flow-author">
'.$sp.''.((LR::ifvar($cx, (($inary && isset($in['links'])) ? $in['links'] : null), false)) ? ''.((LR::ifvar($cx, ((isset($in['links']) && is_array($in['links']) && isset($in['links']['userpage'])) ? $in['links']['userpage'] : null), false)) ? '            <a href="'.LR::encq($cx, ((isset($in['links']['userpage']) && is_array($in['links']['userpage']) && isset($in['links']['userpage']['url'])) ? $in['links']['userpage']['url'] : null)).'"
'.$sp.'               '.((!LR::ifvar($cx, (($inary && isset($in['name'])) ? $in['name'] : null), false)) ? 'title="'.LR::encq($cx, ((isset($in['links']['userpage']) && is_array($in['links']['userpage']) && isset($in['links']['userpage']['title'])) ? $in['links']['userpage']['title'] : null)).'"' : '').'
'.$sp.'               class="'.((!LR::ifvar($cx, ((isset($in['links']['userpage']) && is_array($in['links']['userpage']) && isset($in['links']['userpage']['exists'])) ? $in['links']['userpage']['exists'] : null), false)) ? 'new ' : '').'mw-userlink">
'.$sp.'' : '').''.((LR::ifvar($cx, (($inary && isset($in['name'])) ? $in['name'] : null), false)) ? '<bdi>'.LR::encq($cx, (($inary && isset($in['name'])) ? $in['name'] : null)).'</bdi>' : ''.LR::encq($cx, LR::hbch($cx, 'l10n', array(array('flow-anonymous'),array()), 'encq', $in)).'').''.((LR::ifvar($cx, ((isset($in['links']) && is_array($in['links']) && isset($in['links']['userpage'])) ? $in['links']['userpage'] : null), false)) ? '</a>' : '').'<span class="mw-usertoollinks flow-pipelist">
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 2 other locations - About 1 wk to fix
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 49..61
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 49..61

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

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

'flow_post_meta_actions' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-post-meta">
'.$sp.'    <span class="flow-post-meta-actions">
'.$sp.''.((LR::ifvar($cx, ((isset($in['actions']) && is_array($in['actions']) && isset($in['actions']['reply'])) ? $in['actions']['reply'] : null), false)) ? '            <a href="'.LR::encq($cx, ((isset($in['actions']['reply']) && is_array($in['actions']['reply']) && isset($in['actions']['reply']['url'])) ? $in['actions']['reply']['url'] : null)).'"
'.$sp.'               title="'.LR::encq($cx, ((isset($in['actions']['reply']) && is_array($in['actions']['reply']) && isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : null)).'"
'.$sp.'               class="mw-ui-anchor mw-ui-progressive mw-ui-quiet flow-reply-link"
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 2 other locations - About 1 wk to fix
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 64..86
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 64..86

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

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

'flow_reply_form' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.''.((!LR::ifvar($cx, ((isset($in['actions']) && is_array($in['actions']) && isset($in['actions']['unlock'])) ? $in['actions']['unlock'] : null), false)) ? '
'.$sp.'<form class="flow-post flow-reply-form"
'.$sp.'      method="POST"
'.$sp.'      action="'.LR::encq($cx, ((isset($in['actions']['reply']) && is_array($in['actions']['reply']) && isset($in['actions']['reply']['url'])) ? $in['actions']['reply']['url'] : null)).'"
'.$sp.'      id="flow-reply-'.LR::encq($cx, (($inary && isset($in['postId'])) ? $in['postId'] : null)).'"
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 4 other locations - About 1 wk to fix
handlebars/compiled/flow_block_topic.handlebars.php on lines 151..179
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 178..206
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 178..206
handlebars/compiled/flow_block_topiclist.handlebars.php on lines 183..211

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

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

'flow_post_partial' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.''.LR::wi($cx, (($inary && isset($in['revision'])) ? $in['revision'] : null), null, $in, function($cx, $in)use($sp){$inary=is_array($in);return '    <div id="flow-post-'.LR::encq($cx, (($inary && isset($in['postId'])) ? $in['postId'] : null)).'"
'.$sp.'         class="flow-post'.((LR::ifvar($cx, (($inary && isset($in['isMaxThreadingDepth'])) ? $in['isMaxThreadingDepth'] : null), false)) ? ' flow-post-max-depth' : '').'"
'.$sp.'         data-flow-id="'.LR::encq($cx, (($inary && isset($in['postId'])) ? $in['postId'] : null)).'"
'.$sp.'    >
'.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isModerated'])) ? $in['isModerated'] : null), false)) ? ''.LR::hbbch($cx, 'ifCond', array(array((isset($cx['sp_vars']['root']['rootBlock']['submitted']['showPostId']) ? $cx['sp_vars']['root']['rootBlock']['submitted']['showPostId'] : null),'===',(($inary && isset($in['postId'])) ? $in['postId'] : null)),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::p($cx, 'flow_post_inner', array(array($in),array()),0, '                ').'';}, function($cx, $in)use($sp){$inary=is_array($in);return '                <div class="flow-post-main flow-post-moderated">
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 2 other locations - About 6 days to fix
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 212..222
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 212..222

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

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

'flow_edit_post' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<form class="flow-edit-post-form"
'.$sp.'    method="POST"
'.$sp.'    action="'.LR::encq($cx, ((isset($in['actions']['edit']) && is_array($in['actions']['edit']) && isset($in['actions']['edit']['url'])) ? $in['actions']['edit']['url'] : null)).'"
'.$sp.'>
'.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '    ').'    <input type="hidden" name="wpEditToken" value="'.LR::encq($cx, (isset($cx['sp_vars']['root']['rootBlock']['editToken']) ? $cx['sp_vars']['root']['rootBlock']['editToken'] : null)).'" />
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 2 other locations - About 4 days to fix
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 161..177
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 161..177

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

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

'flow_post_replies' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-replies">
'.$sp.''.LR::sec($cx, (($inary && isset($in['replies'])) ? $in['replies'] : null), null, $in, true, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::hbbch($cx, 'eachPost', array(array((isset($cx['sp_vars']['root']['rootBlock']) ? $cx['sp_vars']['root']['rootBlock'] : null),$in),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return '            <!-- eachPost nested replies -->
'.$sp.'            '.LR::encq($cx, LR::hbch($cx, 'post', array(array((isset($cx['sp_vars']['root']['rootBlock']) ? $cx['sp_vars']['root']['rootBlock'] : null),$in),array()), 'encq', $in)).'
'.$sp.'';}).'';}).''.LR::hbbch($cx, 'ifCond', array(array((isset($cx['sp_vars']['root']['rootBlock']['submitted']['postId']) ? $cx['sp_vars']['root']['rootBlock']['submitted']['postId'] : null),'===',(($inary && isset($in['postId'])) ? $in['postId'] : null)),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::hbbch($cx, 'ifCond', array(array((isset($cx['sp_vars']['root']['rootBlock']['submitted']['action']) ? $cx['sp_vars']['root']['rootBlock']['submitted']['action'] : null),'===','reply'),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::p($cx, 'flow_reply_form', array(array($in),array()),0, '            ').'';}).'';}).'</div>
';},
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 2 other locations - About 3 days to fix
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 207..211
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 207..211

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

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

'flow_post_inner' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-post-main">
'.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '    ').'
'.$sp.''.LR::wi($cx, (($inary && isset($in['creator'])) ? $in['creator'] : null), null, $in, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::p($cx, 'flow_post_author', array(array($in),array()),0, '        ').'';}).'
'.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isModerated'])) ? $in['isModerated'] : null), false)) ? '        <div class="flow-moderated-post-content">
'.$sp.''.LR::p($cx, 'flow_post_moderation_state', array(array($in),array()),0, '            ').'        </div>
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 2 other locations - About 3 days to fix
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 143..152
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 143..152

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

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

'flow_anon_warning' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-anon-warning">
'.$sp.'    <div class="flow-anon-warning-mobile">
'.$sp.''.LR::hbbch($cx, 'tooltip', array(array(),array('positionClass'=>'down','contextClass'=>'progressive','extraClass'=>'flow-form-collapsible','isBlock'=>true)), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::encq($cx, LR::hbch($cx, 'l10nParse', array(array('flow-anon-warning',LR::hbch($cx, 'linkWithReturnTo', array(array('Special:UserLogin'),array()), 'raw', $in),LR::hbch($cx, 'linkWithReturnTo', array(array('Special:UserLogin/signup'),array()), 'raw', $in)),array()), 'encq', $in)).'';}).'    </div>
'.$sp.'
'.$sp.''.LR::hbbch($cx, 'progressiveEnhancement', array(array(),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return '        <div class="flow-anon-warning-desktop">
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 5 other locations - About 3 days to fix
handlebars/compiled/flow_block_topic.handlebars.php on lines 143..150
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 153..160
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 153..160
handlebars/compiled/flow_block_topiclist.handlebars.php on lines 31..38
handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php on lines 19..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 596.

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

'flow_post_moderation_state' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<span class="plainlinks">'.((LR::ifvar($cx, (($inary && isset($in['replyToId'])) ? $in['replyToId'] : null), false)) ? ''.LR::encq($cx, LR::hbch($cx, 'l10nParse', array(array(LR::hbch($cx, 'concat', array(array('flow-',(($inary && isset($in['moderateState'])) ? $in['moderateState'] : null),'-post-content'),array()), 'raw', $in),((isset($in['moderator']) && is_array($in['moderator']) && isset($in['moderator']['name'])) ? $in['moderator']['name'] : null),((isset($in['links']['topic-history']) && is_array($in['links']['topic-history']) && isset($in['links']['topic-history']['url'])) ? $in['links']['topic-history']['url'] : null)),array()), 'encq', $in)).'' : ''.LR::encq($cx, LR::hbch($cx, 'l10nParse', array(array(LR::hbch($cx, 'concat', array(array('flow-',(($inary && isset($in['moderateState'])) ? $in['moderateState'] : null),'-title-content'),array()), 'raw', $in),((isset($in['moderator']) && is_array($in['moderator']) && isset($in['moderator']['name'])) ? $in['moderator']['name'] : null),((isset($in['links']['topic-history']) && is_array($in['links']['topic-history']) && isset($in['links']['topic-history']['url'])) ? $in['links']['topic-history']['url'] : null)),array()), 'encq', $in)).'').'</span>
';},
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 4 other locations - About 2 days to fix
handlebars/compiled/flow_block_topic.handlebars.php on lines 28..29
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 62..63
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 62..63
handlebars/compiled/flow_block_topiclist.handlebars.php on lines 68..69

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

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

'flow_post_actions' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-menu flow-menu-hoverable">
'.$sp.'    <div class="flow-menu-js-drop"><a href="javascript:void(0);"><span class="mw-ui-icon mw-ui-icon-before mw-ui-icon-only mw-ui-icon-ellipsis" aria-label="'.LR::encq($cx, LR::hbch($cx, 'l10n', array(array('flow-post-action-menu-accessibility-name'),array()), 'encq', $in)).'"></span></a></div>
'.$sp.'    <ul class="mw-ui-button-container flow-list">
'.$sp.''.LR::p($cx, 'flow_moderation_actions_list', array(array($in),array('moderationType'=>'post','moderationTarget'=>'post','moderationTemplate'=>'post','moderationContainerClass'=>'flow-menu','moderationMwUiClass'=>'mw-ui-button','moderationIcons'=>true)),0, '        ').'    </ul>
'.$sp.'</div>
Severity: Major
Found in handlebars/compiled/flow_post.handlebars.php and 2 other locations - About 5 hrs to fix
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 137..142
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 137..142

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

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