XoopsModules25x/xoopspoll

View on GitHub
extras/newbb_4x/trunk_4_00/language/main.php

Summary

Maintainability
F
1 mo
Test Coverage

File main.php has 397 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
//
if (defined('MAIN_DEFINED')) {
    return;
}
Severity: Minor
Found in extras/newbb_4x/trunk_4_00/language/main.php - About 5 hrs to fix

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

    <?php
    //
    if (defined('MAIN_DEFINED')) {
        return;
    }
    Severity: Major
    Found in extras/newbb_4x/trunk_4_00/language/main.php and 1 other location - About 1 mo to fix
    extras/newbb_5x/trunk_5_00/language/main.php on lines 1..495

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

    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

    A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 6 and the first side effect is on line 4.
    Open

    <?php

    Line exceeds 120 characters; contains 194 characters
    Open

    define('_MD_DESC_UNDIGEST', 'Once you press the unDigest button at the bottom of this form the topic you have selected will be unDigested. You may Digest it again at a later time if you like.');

    Line exceeds 120 characters; contains 149 characters
    Open

    //define('_MD_PRIVATE', 'This is a <strong>Private</strong> forum.<br>Only users with special access can post new topics and replies to this forum');

    Line exceeds 120 characters; contains 190 characters
    Open

    define('_MD_DESC_STICKY', 'Once you press the Sticky button at the bottom of this form the topic you have selected will be Stickyed. You may unSticky it again at a later time if you like.');

    Line exceeds 120 characters; contains 131 characters
    Open

    define('_MD_SUSPEND_TEXT', 'User %s is suspended for %d days due to:<br>[quote]%s[/quote]<br><br>The suspension is valid till %s');

    Line exceeds 120 characters; contains 183 characters
    Open

    define('_MD_DESC_MOVE', 'Once you press the move button at the bottom of this form the topic you have selected, and its related posts, will be moved to the forum you have selected.');

    Line exceeds 120 characters; contains 190 characters
    Open

    define('_MD_DESC_DIGEST', 'Once you press the Digest button at the bottom of this form the topic you have selected will be Digested. You may unDigest it again at a later time if you like.');

    Line exceeds 120 characters; contains 186 characters
    Open

    define('_MD_DESC_UNLOCK', 'Once you press the unlock button at the bottom of this form the topic you have selected will be unlocked. You may lock it again at a later time if you like.');

    Line exceeds 120 characters; contains 247 characters
    Open

           'Once you press the merge button at the bottom of this form the topic you have selected, and its related posts, will be merged to the topic you have selected.<br><strong>The destination topic ID must be smaller than current one</strong>.');

    Line exceeds 120 characters; contains 176 characters
    Open

    define('_MD_DESC_LOCK', 'Once you press the lock button at the bottom of this form the topic you have selected will be locked. You may unlock it at a later time if you like.');

    Line exceeds 120 characters; contains 173 characters
    Open

    define('_MD_INVALID_SUBMIT', 'Invalid submission. You could have exceeded session time. Please re-submit or make a backup of your post and login to resubmit if necessary.');

    Line exceeds 120 characters; contains 224 characters
    Open

    // !!IMPORTANT!! insert '\' before any char among reserved chars: "a", "A", "B", "c", "d", "D", "F", "g", "G", "h", "H", "i", "I", "j", "l", "L", "m", "M", "n", "O", "r", "s", "S", "t", "T", "U", "w", "W", "Y", "y", "z", "Z"

    Line exceeds 120 characters; contains 194 characters
    Open

    define('_MD_DESC_UNSTICKY', 'Once you press the unSticky button at the bottom of this form the topic you have selected will be unStickyed. You may Sticky it again at a later time if you like.');

    Line exceeds 120 characters; contains 191 characters
    Open

    define('_MD_DESC_DELETE', 'Once you press the delete button at the bottom of this form the topic you have selected, and all its related posts, will be <strong>permanently</strong> removed.');

    Multi-line function call not indented correctly; expected 0 spaces but found 7
    Open

           'Once you press the merge button at the bottom of this form the topic you have selected, and its related posts, will be merged to the topic you have selected.<br><strong>The destination topic ID must be smaller than current one</strong>.');

    Opening parenthesis of a multi-line function call must be the last content on the line
    Open

    define('_MD_DESC_MERGE',

    Closing parenthesis of a multi-line function call must be on a line by itself
    Open

           'Once you press the merge button at the bottom of this form the topic you have selected, and its related posts, will be merged to the topic you have selected.<br><strong>The destination topic ID must be smaller than current one</strong>.');

    There are no issues that match your filters.

    Category
    Status