qcminecraft/Carbon-Forum-F

View on GitHub

Showing 851 of 851 total issues

Function Manage has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function Manage(ID, Type, Action, NeedToConfirm, TargetTag) {
Severity: Minor
Found in static/js/default/global.js - About 35 mins to fix

    Function popup has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        function popup(url, name, width, height, options)
    Severity: Minor
    Found in static/editor/third-party/SyntaxHighlighter/shCore.js - About 35 mins to fix

      Method addAttachment has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment')
      Severity: Minor
      Found in library/PHPMailer.class.php - About 35 mins to fix

        Method addStringAttachment has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $string,
                $filename,
                $encoding = 'base64',
                $type = '',
                $disposition = 'attachment'
        Severity: Minor
        Found in library/PHPMailer.class.php - About 35 mins to fix

          Method _deep_analysis_cn has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              private function _deep_analysis_cn(&$str, $lastec, $spos, $slen, $optimize = true)
          Severity: Minor
          Found in library/PHPAnalysis.class.php - About 35 mins to fix

            Method success_validate has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function success_validate($challenge, $validate, $seccode,$param, $json_format=1) {
            Severity: Minor
            Found in library/Geetestlib.class.php - About 35 mins to fix

              Method mailPassthru has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  private function mailPassthru($to, $subject, $body, $header, $params)
              Severity: Minor
              Found in library/PHPMailer.class.php - About 35 mins to fix

                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function __construct($Host, $DBPort, $DBName, $DBUser, $DBPassword)
                Severity: Minor
                Found in library/PDO.class.php - About 35 mins to fix

                  Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function __construct($fileField, $config, $type, $CurUserName, $DB = '')
                  Severity: Minor
                  Found in library/Uploader.class.php - About 35 mins to fix

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

                                uploader.on('fileDequeued', function (file) {
                                    fileCount--;
                                    fileSize -= file.size;
                    
                                    removeFile(file);
                    Severity: Minor
                    Found in static/editor/dialogs/attachment/attachment.js and 2 other locations - About 35 mins to fix
                    static/editor/dialogs/image/image.js on lines 668..674
                    static/editor/dialogs/video/video.js on lines 679..685

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

                    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

                            var keywords =    'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
                                            'case char class comp const constructor currency destructor div do double ' +
                                            'downto else end except exports extended false file finalization finally ' +
                                            'for function goto if implementation in inherited int64 initialization ' +
                                            'integer interface is label library longint longword mod nil not object ' +
                    Severity: Minor
                    Found in static/editor/third-party/SyntaxHighlighter/shCore.js and 1 other location - About 35 mins to fix
                    static/editor/third-party/SyntaxHighlighter/shCore.js on lines 2935..2945

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

                    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

                                uploader.on('fileDequeued', function (file) {
                                    fileCount--;
                                    fileSize -= file.size;
                    
                                    removeFile(file);
                    Severity: Minor
                    Found in static/editor/dialogs/video/video.js and 2 other locations - About 35 mins to fix
                    static/editor/dialogs/attachment/attachment.js on lines 453..459
                    static/editor/dialogs/image/image.js on lines 668..674

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

                    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

                                uploader.on('fileDequeued', function (file) {
                                    fileCount--;
                                    fileSize -= file.size;
                    
                                    removeFile(file);
                    Severity: Minor
                    Found in static/editor/dialogs/image/image.js and 2 other locations - About 35 mins to fix
                    static/editor/dialogs/attachment/attachment.js on lines 453..459
                    static/editor/dialogs/video/video.js on lines 679..685

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

                    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

                            var methods   = 'allProperties count get size '+
                                            'collect each eachProperty eachPropertyName eachWithIndex find findAll ' +
                                            'findIndexOf grep inject max min reverseEach sort ' +
                                            'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' +
                                            'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' +
                    Severity: Minor
                    Found in static/editor/third-party/SyntaxHighlighter/shCore.js and 1 other location - About 35 mins to fix
                    static/editor/third-party/SyntaxHighlighter/shCore.js on lines 2827..2837

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

                    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 CheckUserName has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function CheckUserName() {
                        if ($("#UserName").val() && $("#UserName").val().length >= 4 && $("#UserName").val().length <= 20) {
                            $.ajax({
                                url: WebsitePath + '/json/user_exist',
                                data: {
                    Severity: Minor
                    Found in static/js/default/account.function.js - About 35 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function SaveTopicDraft has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function SaveTopicDraft() {
                        try {
                            var TagsList = JSON.stringify($("input[name='Tag[]']").map(function () {
                                return $(this).val();
                            }).get());
                    Severity: Minor
                    Found in static/js/default/new.function.js - About 35 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function getManageInfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function getManageInfo($manageType)
                        {
                            global $CurUserID;
                            switch ($manageType) {
                                case 'topic':
                    Severity: Minor
                    Found in controller/manage.php - About 35 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function createTab has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    (function createTab(content) {
                        for (var i = 0, ci; ci = content[i++];) {
                            var span = document.createElement("span");
                            span.setAttribute("tabSrc", ci.name);
                            span.innerHTML = ci.title;
                    Severity: Minor
                    Found in static/editor/dialogs/spechars/spechars.js - About 35 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function toArray has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    baidu.lang.toArray = function (source) {
                        if (source === null || source === undefined)
                            return [];
                        if (baidu.lang.isArray(source))
                            return source;
                    Severity: Minor
                    Found in static/editor/dialogs/wordimage/tangram.js - About 35 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function Request has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function Request($Type, $Key, $DefaultValue = '')
                    {
                        global $_PUT, $_DELETE, $_OPTIONS;
                        switch ($Type) {
                            case 'Get':
                    Severity: Minor
                    Found in common.php - About 35 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Severity
                    Category
                    Status
                    Source
                    Language