wikimedia/mediawiki-extensions-Flow

View on GitHub

Showing 907 of 907 total issues

File Hooks.php has 1351 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

// phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName

namespace Flow;
Severity: Major
Found in includes/Hooks.php - About 3 days to fix

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

    'flow_post_inner' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-post-main">
    '.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '    ').'
    '.$sp.''.LR::wi($cx, (($inary && isset($in['creator'])) ? $in['creator'] : null), null, $in, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::p($cx, 'flow_post_author', array(array($in),array()),0, '        ').'';}).'
    '.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isModerated'])) ? $in['isModerated'] : null), false)) ? '        <div class="flow-moderated-post-content">
    '.$sp.''.LR::p($cx, 'flow_post_moderation_state', array(array($in),array()),0, '            ').'        </div>
    handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 143..152
    handlebars/compiled/flow_post.handlebars.php on lines 120..129

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 599.

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

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

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

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

    Refactorings

    Further Reading

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

    'flow_post_inner' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-post-main">
    '.$sp.''.LR::p($cx, 'flow_errors', array(array($in),array()),0, '    ').'
    '.$sp.''.LR::wi($cx, (($inary && isset($in['creator'])) ? $in['creator'] : null), null, $in, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::p($cx, 'flow_post_author', array(array($in),array()),0, '        ').'';}).'
    '.$sp.''.((LR::ifvar($cx, (($inary && isset($in['isModerated'])) ? $in['isModerated'] : null), false)) ? '        <div class="flow-moderated-post-content">
    '.$sp.''.LR::p($cx, 'flow_post_moderation_state', array(array($in),array()),0, '            ').'        </div>
    handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 143..152
    handlebars/compiled/flow_post.handlebars.php on lines 120..129

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 599.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 599.

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

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

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

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

    Refactorings

    Further Reading

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

    'flow_anon_warning' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-anon-warning">
    '.$sp.'    <div class="flow-anon-warning-mobile">
    '.$sp.''.LR::hbbch($cx, 'tooltip', array(array(),array('positionClass'=>'down','contextClass'=>'progressive','extraClass'=>'flow-form-collapsible','isBlock'=>true)), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::encq($cx, LR::hbch($cx, 'l10nParse', array(array('flow-anon-warning',LR::hbch($cx, 'linkWithReturnTo', array(array('Special:UserLogin'),array()), 'raw', $in),LR::hbch($cx, 'linkWithReturnTo', array(array('Special:UserLogin/signup'),array()), 'raw', $in)),array()), 'encq', $in)).'';}).'    </div>
    '.$sp.'
    '.$sp.''.LR::hbbch($cx, 'progressiveEnhancement', array(array(),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return '        <div class="flow-anon-warning-desktop">
    handlebars/compiled/flow_block_topic.handlebars.php on lines 143..150
    handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 153..160
    handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 153..160
    handlebars/compiled/flow_block_topiclist.handlebars.php on lines 31..38
    handlebars/compiled/flow_post.handlebars.php on lines 130..137

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 596.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 596.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 596.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 596.

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

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

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

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

    Refactorings

    Further Reading

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

    'flow_anon_warning' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-anon-warning">
    '.$sp.'    <div class="flow-anon-warning-mobile">
    '.$sp.''.LR::hbbch($cx, 'tooltip', array(array(),array('positionClass'=>'down','contextClass'=>'progressive','extraClass'=>'flow-form-collapsible','isBlock'=>true)), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::encq($cx, LR::hbch($cx, 'l10nParse', array(array('flow-anon-warning',LR::hbch($cx, 'linkWithReturnTo', array(array('Special:UserLogin'),array()), 'raw', $in),LR::hbch($cx, 'linkWithReturnTo', array(array('Special:UserLogin/signup'),array()), 'raw', $in)),array()), 'encq', $in)).'';}).'    </div>
    '.$sp.'
    '.$sp.''.LR::hbbch($cx, 'progressiveEnhancement', array(array(),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return '        <div class="flow-anon-warning-desktop">
    handlebars/compiled/flow_block_topic.handlebars.php on lines 143..150
    handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php on lines 153..160
    handlebars/compiled/flow_block_topiclist.handlebars.php on lines 31..38
    handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php on lines 19..26
    handlebars/compiled/flow_post.handlebars.php on lines 130..137

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 596.

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

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

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

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

    Refactorings

    Further Reading

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

    'flow_anon_warning' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-anon-warning">
    '.$sp.'    <div class="flow-anon-warning-mobile">
    '.$sp.''.LR::hbbch($cx, 'tooltip', array(array(),array('positionClass'=>'down','contextClass'=>'progressive','extraClass'=>'flow-form-collapsible','isBlock'=>true)), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return ''.LR::encq($cx, LR::hbch($cx, 'l10nParse', array(array('flow-anon-warning',LR::hbch($cx, 'linkWithReturnTo', array(array('Special:UserLogin'),array()), 'raw', $in),LR::hbch($cx, 'linkWithReturnTo', array(array('Special:UserLogin/signup'),array()), 'raw', $in)),array()), 'encq', $in)).'';}).'    </div>
    '.$sp.'
    '.$sp.''.LR::hbbch($cx, 'progressiveEnhancement', array(array(),array()), $in, false, function($cx, $in)use($sp){$inary=is_array($in);return '        <div class="flow-anon-warning-desktop">
    handlebars/compiled/flow_block_topic.handlebars.php on lines 143..150
    handlebars/compiled/flow_block_topic_moderate_post.handlebars.php on lines 153..160
    handlebars/compiled/flow_block_topiclist.handlebars.php on lines 31..38
    handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php on lines 19..26
    handlebars/compiled/flow_post.handlebars.php on lines 130..137

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 596.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 569.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 569.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 569.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 569.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 569.

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

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

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

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

    Refactorings

    Further Reading

    Function __module9__ has 531 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var __module9__ = (function() {
      "use strict";
      var __exports__;
      /* jshint ignore:start */
      /* istanbul ignore next */
    Severity: Major
    Found in modules/libs/handlebars-v3.0.0.js - About 2 days to fix

      Function handlebars has 527 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var handlebars = (function(){
        var parser = {trace: function trace() { },
        yy: {},
        symbols_: {"error":2,"root":3,"program":4,"EOF":5,"program_repetition0":6,"statement":7,"mustache":8,"block":9,"rawBlock":10,"partial":11,"content":12,"COMMENT":13,"CONTENT":14,"openRawBlock":15,"END_RAW_BLOCK":16,"OPEN_RAW_BLOCK":17,"helperName":18,"openRawBlock_repetition0":19,"openRawBlock_option0":20,"CLOSE_RAW_BLOCK":21,"openBlock":22,"block_option0":23,"closeBlock":24,"openInverse":25,"block_option1":26,"OPEN_BLOCK":27,"openBlock_repetition0":28,"openBlock_option0":29,"openBlock_option1":30,"CLOSE":31,"OPEN_INVERSE":32,"openInverse_repetition0":33,"openInverse_option0":34,"openInverse_option1":35,"openInverseChain":36,"OPEN_INVERSE_CHAIN":37,"openInverseChain_repetition0":38,"openInverseChain_option0":39,"openInverseChain_option1":40,"inverseAndProgram":41,"INVERSE":42,"inverseChain":43,"inverseChain_option0":44,"OPEN_ENDBLOCK":45,"OPEN":46,"mustache_repetition0":47,"mustache_option0":48,"OPEN_UNESCAPED":49,"mustache_repetition1":50,"mustache_option1":51,"CLOSE_UNESCAPED":52,"OPEN_PARTIAL":53,"partialName":54,"partial_repetition0":55,"partial_option0":56,"param":57,"sexpr":58,"OPEN_SEXPR":59,"sexpr_repetition0":60,"sexpr_option0":61,"CLOSE_SEXPR":62,"hash":63,"hash_repetition_plus0":64,"hashSegment":65,"ID":66,"EQUALS":67,"blockParams":68,"OPEN_BLOCK_PARAMS":69,"blockParams_repetition_plus0":70,"CLOSE_BLOCK_PARAMS":71,"path":72,"dataName":73,"STRING":74,"NUMBER":75,"BOOLEAN":76,"DATA":77,"pathSegments":78,"SEP":79,"$accept":0,"$end":1},
        terminals_: {2:"error",5:"EOF",13:"COMMENT",14:"CONTENT",16:"END_RAW_BLOCK",17:"OPEN_RAW_BLOCK",21:"CLOSE_RAW_BLOCK",27:"OPEN_BLOCK",31:"CLOSE",32:"OPEN_INVERSE",37:"OPEN_INVERSE_CHAIN",42:"INVERSE",45:"OPEN_ENDBLOCK",46:"OPEN",49:"OPEN_UNESCAPED",52:"CLOSE_UNESCAPED",53:"OPEN_PARTIAL",59:"OPEN_SEXPR",62:"CLOSE_SEXPR",66:"ID",67:"EQUALS",69:"OPEN_BLOCK_PARAMS",71:"CLOSE_BLOCK_PARAMS",74:"STRING",75:"NUMBER",76:"BOOLEAN",77:"DATA",79:"SEP"},
      Severity: Major
      Found in modules/libs/handlebars-v3.0.0.js - About 2 days to fix

        File container.php has 954 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        use Flow\Data\Index\PostRevisionBoardHistoryIndex;
        use Flow\Data\Index\PostRevisionTopicHistoryIndex;
        use Flow\Data\Index\PostSummaryRevisionBoardHistoryIndex;
        Severity: Major
        Found in container.php - About 2 days to fix

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

          'flow_topic_titlebar' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic-titlebar">
          '.$sp.''.LR::p($cx, 'flow_topic_titlebar_content', array(array($in),array()),0, '    ').''.LR::p($cx, 'flow_topic_titlebar_summary', array(array((($inary && isset($in['summary'])) ? $in['summary'] : null)),array('isLocked'=>(($inary && isset($in['isLocked'])) ? $in['isLocked'] : null))),0, '    ').''.((LR::ifvar($cx, (($inary && isset($in['watchable'])) ? $in['watchable'] : null), false)) ? ''.LR::p($cx, 'flow_topic_titlebar_watch', array(array($in),array()),0, '        ').'' : '').'    <div class="flow-menu flow-menu-hoverable">
          '.$sp.'        <div class="flow-menu-js-drop"><a href="javascript:void(0);"><span class="mw-ui-icon mw-ui-icon-before mw-ui-icon-only mw-ui-icon-ellipsis" aria-label="'.LR::encq($cx, LR::hbch($cx, 'l10n', array(array('flow-topic-action-menu-accessibility-name'),array()), 'encq', $in)).'"></span></a></div>
          '.$sp.'        <ul class="mw-ui-button-container flow-list">
          '.$sp.''.LR::p($cx, 'flow_moderation_actions_list', array(array($in),array('moderationType'=>'topic','moderationTarget'=>'title','moderationTemplate'=>'topic','moderationContainerClass'=>'flow-menu','moderationMwUiClass'=>'mw-ui-button','moderationIcons'=>true)),0, '            ').'        </ul>
          Severity: Major
          Found in handlebars/compiled/flow_block_topiclist.handlebars.php and 1 other location - About 2 days to fix
          handlebars/compiled/flow_block_topic.handlebars.php on lines 135..142

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 436.

          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' => function ($cx, $in, $sp) {$inary=is_array($in);return ''.$sp.'<div class="flow-topic-titlebar">
          '.$sp.''.LR::p($cx, 'flow_topic_titlebar_content', array(array($in),array()),0, '    ').''.LR::p($cx, 'flow_topic_titlebar_summary', array(array((($inary && isset($in['summary'])) ? $in['summary'] : null)),array('isLocked'=>(($inary && isset($in['isLocked'])) ? $in['isLocked'] : null))),0, '    ').''.((LR::ifvar($cx, (($inary && isset($in['watchable'])) ? $in['watchable'] : null), false)) ? ''.LR::p($cx, 'flow_topic_titlebar_watch', array(array($in),array()),0, '        ').'' : '').'    <div class="flow-menu flow-menu-hoverable">
          '.$sp.'        <div class="flow-menu-js-drop"><a href="javascript:void(0);"><span class="mw-ui-icon mw-ui-icon-before mw-ui-icon-only mw-ui-icon-ellipsis" aria-label="'.LR::encq($cx, LR::hbch($cx, 'l10n', array(array('flow-topic-action-menu-accessibility-name'),array()), 'encq', $in)).'"></span></a></div>
          '.$sp.'        <ul class="mw-ui-button-container flow-list">
          '.$sp.''.LR::p($cx, 'flow_moderation_actions_list', array(array($in),array('moderationType'=>'topic','moderationTarget'=>'title','moderationTemplate'=>'topic','moderationContainerClass'=>'flow-menu','moderationMwUiClass'=>'mw-ui-button','moderationIcons'=>true)),0, '            ').'        </ul>
          Severity: Major
          Found in handlebars/compiled/flow_block_topic.handlebars.php and 1 other location - About 2 days to fix
          handlebars/compiled/flow_block_topiclist.handlebars.php on lines 175..182

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

          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