wikimedia/mediawiki-extensions-Flow

View on GitHub

Showing 907 of 907 total issues

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

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_block_topic.handlebars.php and 4 other locations - About 1 wk to fix
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
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)).'"
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 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_block_topiclist.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_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 2 locations. Consider refactoring.
Open

'flow_topic_titlebar_summary' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic-summary-container '.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? 'flow-collapse-toggle flow-click-interactive' : '').'"
'.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? '        data-flow-interactive-handler="collapserCollapsibleToggle"
'.$sp.'' : '').'        >
'.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '    ').''.((LR::ifvar($cx, ((isset($in['revision']['content']) && is_array($in['revision']['content']) && isset($in['revision']['content']['content'])) ? $in['revision']['content']['content'] : null), false)) ? '        <div class="flow-topic-summary">
'.$sp.'            <div class="flow-topic-summary-author">
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 99..114

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

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_summary' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic-summary-container '.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? 'flow-collapse-toggle flow-click-interactive' : '').'"
'.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isLocked'])) ? $in['isLocked'] : null), false)) ? '        data-flow-interactive-handler="collapserCollapsibleToggle"
'.$sp.'' : '').'        >
'.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '    ').''.((LR::ifvar($cx, ((isset($in['revision']['content']) && is_array($in['revision']['content']) && isset($in['revision']['content']['content'])) ? $in['revision']['content']['content'] : null), false)) ? '        <div class="flow-topic-summary">
'.$sp.'            <div class="flow-topic-summary-author">
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 59..74

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

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_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">
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 212..222
handlebars/compiled/flow_post.handlebars.php on lines 189..199

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_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">
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 212..222
handlebars/compiled/flow_post.handlebars.php on lines 189..199

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)).'" />
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 161..177
handlebars/compiled/flow_post.handlebars.php on lines 138..154

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_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_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)).'" />
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 161..177
handlebars/compiled/flow_post.handlebars.php on lines 138..154

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

'flow_topic_titlebar_watch' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic-watchlist flow-watch-link">
'.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '    ').'
'.$sp.'    <a href="'.((LR::ifvar($cx, (($inary && isset($in['isWatched'])) ? $in['isWatched'] : null), false)) ? ''.LR::encq($cx, ((isset($in['links']['unwatch-topic']) && is_array($in['links']['unwatch-topic']) && isset($in['links']['unwatch-topic']['url'])) ? $in['links']['unwatch-topic']['url'] : null)).'' : ''.LR::encq($cx, ((isset($in['links']['watch-topic']) && is_array($in['links']['watch-topic']) && isset($in['links']['watch-topic']['url'])) ? $in['links']['watch-topic']['url'] : null)).'').'"
'.$sp.'       class="mw-ui-anchor mw-ui-hovericon '.((!LR::ifvar($cx, (($inary && isset($in['isWatched'])) ? $in['isWatched'] : null), false)) ? 'mw-ui-quiet' : '').'
'.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isWatched'])) ? $in['isWatched'] : null), false)) ? 'flow-watch-link-unwatch' : 'flow-watch-link-watch').'"
Severity: Major
Found in handlebars/compiled/flow_block_topic.handlebars.php and 1 other location - About 4 days to fix
handlebars/compiled/flow_block_topiclist.handlebars.php on lines 115..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 744.

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_watch' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic-watchlist flow-watch-link">
'.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '    ').'
'.$sp.'    <a href="'.((LR::ifvar($cx, (($inary && isset($in['isWatched'])) ? $in['isWatched'] : null), false)) ? ''.LR::encq($cx, ((isset($in['links']['unwatch-topic']) && is_array($in['links']['unwatch-topic']) && isset($in['links']['unwatch-topic']['url'])) ? $in['links']['unwatch-topic']['url'] : null)).'' : ''.LR::encq($cx, ((isset($in['links']['watch-topic']) && is_array($in['links']['watch-topic']) && isset($in['links']['watch-topic']['url'])) ? $in['links']['watch-topic']['url'] : null)).'').'"
'.$sp.'       class="mw-ui-anchor mw-ui-hovericon '.((!LR::ifvar($cx, (($inary && isset($in['isWatched'])) ? $in['isWatched'] : null), false)) ? 'mw-ui-quiet' : '').'
'.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isWatched'])) ? $in['isWatched'] : null), false)) ? 'flow-watch-link-unwatch' : 'flow-watch-link-watch').'"
Severity: Major
Found in handlebars/compiled/flow_block_topiclist.handlebars.php and 1 other location - About 4 days to fix
handlebars/compiled/flow_block_topic.handlebars.php on lines 75..84

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

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

'flow_moderate_topic' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<form method="POST" action="'.LR::encq($cx, LR::hbch($cx, 'moderationAction', array(array((($inary && isset($in['actions'])) ? $in['actions'] : null),(isset($cx['sp_vars']['root']['submitted']['moderationState']) ? $cx['sp_vars']['root']['submitted']['moderationState'] : null)),array()), 'encq', $in)).'">
'.$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']['editToken']) ? $cx['sp_vars']['root']['editToken'] : null)).'" />
'.$sp.'    <input name="topic_reason"
'.$sp.'              type="text"
'.$sp.'              size="45"
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 27..44

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

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

'flow_moderate_post' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<form method="POST" action="'.LR::encq($cx, LR::hbch($cx, 'moderationAction', array(array((($inary && isset($in['actions'])) ? $in['actions'] : null),(isset($cx['sp_vars']['root']['submitted']['moderationState']) ? $cx['sp_vars']['root']['submitted']['moderationState'] : null)),array()), 'encq', $in)).'">
'.$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']['editToken']) ? $cx['sp_vars']['root']['editToken'] : null)).'" />
'.$sp.'    <input name="topic_reason"
'.$sp.'              type="text"
'.$sp.'              size="45"
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 27..43

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

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_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>
';},
handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 207..211
handlebars/compiled/flow_post.handlebars.php on lines 184..188

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_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>
';},
handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 207..211
handlebars/compiled/flow_post.handlebars.php on lines 184..188

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

Function __module14__ has 736 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var __module14__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__) {
  "use strict";
  var __exports__;
  var COMPILER_REVISION = __dependency1__.COMPILER_REVISION;
  var REVISION_CHANGES = __dependency1__.REVISION_CHANGES;
Severity: Major
Found in modules/libs/handlebars-v3.0.0.js - About 3 days to fix
    Severity
    Category
    Status
    Source
    Language