wikimedia/mediawiki-extensions-Flow

View on GitHub

Showing 226 of 907 total issues

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

<?php use \LightnCandy\SafeString as SafeString;use \LightnCandy\Runtime as LR;return function ($in = null, $options = null) {
    $helpers = array(            'l10n' => 'Flow\TemplateHelper::l10n',
            'html' => 'Flow\TemplateHelper::htmlHelper',
            'historyTimestamp' => 'Flow\TemplateHelper::historyTimestamp',
            'historyDescription' => 'Flow\TemplateHelper::historyDescription',
Severity: Major
Found in handlebars/compiled/flow_block_topic_history.handlebars.php and 1 other location - About 2 mos to fix
handlebars/compiled/flow_block_board-history.handlebars.php on lines 1..124

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

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

<?php use \LightnCandy\SafeString as SafeString;use \LightnCandy\Runtime as LR;return function ($in = null, $options = null) {
    $helpers = array(            'l10n' => 'Flow\TemplateHelper::l10n',
            'html' => 'Flow\TemplateHelper::htmlHelper',
            'historyTimestamp' => 'Flow\TemplateHelper::historyTimestamp',
            'historyDescription' => 'Flow\TemplateHelper::historyDescription',
Severity: Major
Found in handlebars/compiled/flow_block_board-history.handlebars.php and 1 other location - About 2 mos to fix
handlebars/compiled/flow_block_topic_history.handlebars.php on lines 1..126

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

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

<?php use \LightnCandy\SafeString as SafeString;use \LightnCandy\Runtime as LR;return function ($in = null, $options = null) {
    $helpers = array(            'l10n' => 'Flow\TemplateHelper::l10n',
            'html' => 'Flow\TemplateHelper::htmlHelper',
            'l10nParse' => 'Flow\TemplateHelper::l10nParse',
            'escapeContent' => 'Flow\TemplateHelper::escapeContent',
handlebars/compiled/flow_block_topic_single_view.handlebars.php on lines 1..64

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

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

<?php use \LightnCandy\SafeString as SafeString;use \LightnCandy\Runtime as LR;return function ($in = null, $options = null) {
    $helpers = array(            'l10n' => 'Flow\TemplateHelper::l10n',
            'html' => 'Flow\TemplateHelper::htmlHelper',
            'l10nParse' => 'Flow\TemplateHelper::l10nParse',
            'escapeContent' => 'Flow\TemplateHelper::escapeContent',
handlebars/compiled/flow_block_topicsummary_single_view.handlebars.php on lines 1..63

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

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_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">
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 49..61
handlebars/compiled/flow_post.handlebars.php on lines 26..38

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_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_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">
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 49..61
handlebars/compiled/flow_post.handlebars.php on lines 26..38

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

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

<?php use \LightnCandy\SafeString as SafeString;use \LightnCandy\Runtime as LR;return function ($in = null, $options = null) {
    $helpers = array(            'l10n' => 'Flow\TemplateHelper::l10n',
            'html' => 'Flow\TemplateHelper::htmlHelper',
            'l10nParseFlowTermsOfUse' => 'Flow\TemplateHelper::l10nParseFlowTermsOfUse',
            'diffUndo' => 'Flow\TemplateHelper::diffUndo',
handlebars/compiled/flow_block_header_undo_edit.handlebars.php on lines 1..67

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

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

<?php use \LightnCandy\SafeString as SafeString;use \LightnCandy\Runtime as LR;return function ($in = null, $options = null) {
    $helpers = array(            'l10n' => 'Flow\TemplateHelper::l10n',
            'html' => 'Flow\TemplateHelper::htmlHelper',
            'l10nParseFlowTermsOfUse' => 'Flow\TemplateHelper::l10nParseFlowTermsOfUse',
            'diffUndo' => 'Flow\TemplateHelper::diffUndo',
handlebars/compiled/flow_block_topicsummary_undo_edit.handlebars.php on lines 1..70

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

'flow_topic_titlebar_content' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic-titlebar-container">
'.$sp.'    <h2 class="flow-topic-title flow-load-interactive '.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? 'flow-collapse-toggle flow-click-interactive' : '').'"
'.$sp.'        data-flow-topic-title="'.LR::encq($cx, ((isset($in['content']) && is_array($in['content']) && isset($in['content']['content'])) ? $in['content']['content'] : null)).'"
'.$sp.'        data-flow-load-handler="topicTitle"
'.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? '        data-flow-interactive-handler="collapserCollapsibleToggle"
Severity: Major
Found in handlebars/compiled/flow_block_topic.handlebars.php and 1 other location - About 1 wk to fix
handlebars/compiled/flow_block_topiclist.handlebars.php on lines 70..98

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

'flow_topic_titlebar_content' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic-titlebar-container">
'.$sp.'    <h2 class="flow-topic-title flow-load-interactive '.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? 'flow-collapse-toggle flow-click-interactive' : '').'"
'.$sp.'        data-flow-topic-title="'.LR::encq($cx, ((isset($in['content']) && is_array($in['content']) && isset($in['content']['content'])) ? $in['content']['content'] : null)).'"
'.$sp.'        data-flow-load-handler="topicTitle"
'.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? '        data-flow-interactive-handler="collapserCollapsibleToggle"
Severity: Major
Found in handlebars/compiled/flow_block_topiclist.handlebars.php and 1 other location - About 1 wk to fix
handlebars/compiled/flow_block_topic.handlebars.php on lines 30..58

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

'flow_topic' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic flow-load-interactive'.((LR::ifvar($cx, (($inary && isset($in['moderateState'])) ? $in['moderateState'] : null), false)) ? ' flow-topic-moderatestate-'.LR::encq($cx, (($inary && isset($in['moderateState'])) ? $in['moderateState'] : null)).' ' : '').''.((LR::ifvar($cx, (($inary && isset($in['isModerated'])) ? $in['isModerated'] : null), false)) ? ' flow-topic-moderated ' : '').''.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? 'flow-element-collapsible flow-element-collapsed' : '').'"
'.$sp.'     id="flow-topic-'.LR::encq($cx, (($inary && isset($in['postId'])) ? $in['postId'] : null)).'"
'.$sp.'     data-flow-id="'.LR::encq($cx, (($inary && isset($in['postId'])) ? $in['postId'] : null)).'"
'.$sp.'     data-flow-load-handler="topic"
'.$sp.'     data-flow-toc-scroll-target=".flow-topic-titlebar"
Severity: Major
Found in handlebars/compiled/flow_block_topic.handlebars.php and 1 other location - About 1 wk to fix
handlebars/compiled/flow_block_topiclist.handlebars.php on lines 212..228

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

'flow_topic' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic flow-load-interactive'.((LR::ifvar($cx, (($inary && isset($in['moderateState'])) ? $in['moderateState'] : null), false)) ? ' flow-topic-moderatestate-'.LR::encq($cx, (($inary && isset($in['moderateState'])) ? $in['moderateState'] : null)).' ' : '').''.((LR::ifvar($cx, (($inary && isset($in['isModerated'])) ? $in['isModerated'] : null), false)) ? ' flow-topic-moderated ' : '').''.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? 'flow-element-collapsible flow-element-collapsed' : '').'"
'.$sp.'     id="flow-topic-'.LR::encq($cx, (($inary && isset($in['postId'])) ? $in['postId'] : null)).'"
'.$sp.'     data-flow-id="'.LR::encq($cx, (($inary && isset($in['postId'])) ? $in['postId'] : null)).'"
'.$sp.'     data-flow-load-handler="topic"
'.$sp.'     data-flow-toc-scroll-target=".flow-topic-titlebar"
Severity: Major
Found in handlebars/compiled/flow_block_topiclist.handlebars.php and 1 other location - About 1 wk to fix
handlebars/compiled/flow_block_topic.handlebars.php on lines 180..196

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

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 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"
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 64..86
handlebars/compiled/flow_post.handlebars.php on lines 41..63

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 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"
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 64..86
handlebars/compiled/flow_post.handlebars.php on lines 41..63

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

'flow_newtopic_form' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.''.((LR::ifvar($cx, ((isset($in['actions']) && is_array($in['actions']) && isset($in['actions']['newtopic'])) ? $in['actions']['newtopic'] : null), false)) ? '    <form action="'.LR::encq($cx, ((isset($in['actions']['newtopic']) && is_array($in['actions']['newtopic']) && isset($in['actions']['newtopic']['url'])) ? $in['actions']['newtopic']['url'] : null)).'" method="POST" class="flow-newtopic-form">
'.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '        ').'
'.$sp.''.LR::hbbch($cx, 'ifAnonymous', array(array(),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::p($cx, 'flow_anon_warning', array(array($in),array()),0, '            ').'';}).'
'.$sp.'        <input type="hidden" name="wpEditToken" value="'.LR::encq($cx, (isset($cx['sp_vars']['root']['editToken']) ? $cx['sp_vars']['root']['editToken'] : null)).'" />
'.$sp.'        <input type="hidden" name="topiclist_replyTo" value="'.LR::encq($cx, (($inary && isset($in['workflowId'])) ? $in['workflowId'] : null)).'" />
handlebars/compiled/flow_block_topiclist.handlebars.php on lines 39..65

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

'flow_newtopic_form' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.''.((LR::ifvar($cx, ((isset($in['actions']) && is_array($in['actions']) && isset($in['actions']['newtopic'])) ? $in['actions']['newtopic'] : null), false)) ? '    <form action="'.LR::encq($cx, ((isset($in['actions']['newtopic']) && is_array($in['actions']['newtopic']) && isset($in['actions']['newtopic']['url'])) ? $in['actions']['newtopic']['url'] : null)).'" method="POST" class="flow-newtopic-form">
'.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '        ').'
'.$sp.''.LR::hbbch($cx, 'ifAnonymous', array(array(),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::p($cx, 'flow_anon_warning', array(array($in),array()),0, '            ').'';}).'
'.$sp.'        <input type="hidden" name="wpEditToken" value="'.LR::encq($cx, (isset($cx['sp_vars']['root']['editToken']) ? $cx['sp_vars']['root']['editToken'] : null)).'" />
'.$sp.'        <input type="hidden" name="topiclist_replyTo" value="'.LR::encq($cx, (($inary && isset($in['workflowId'])) ? $in['workflowId'] : null)).'" />
Severity: Major
Found in handlebars/compiled/flow_block_topiclist.handlebars.php and 1 other location - About 1 wk to fix
handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php on lines 27..53

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 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)).'"
handlebars/compiled/flow_block_topic.handlebars.php on lines 151..179
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 178..206
handlebars/compiled/flow_block_topiclist.handlebars.php on lines 183..211
handlebars/compiled/flow_post.handlebars.php on lines 155..183

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 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)).'"
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_topiclist.handlebars.php on lines 183..211
handlebars/compiled/flow_post.handlebars.php on lines 155..183

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

Severity
Category
Status
Source
Language