qcminecraft/Carbon-Forum-F

View on GitHub

Showing 506 of 851 total issues

Function _addOPerateListener has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _addOPerateListener:function (saveNum) {
            var me = this;
            domUtils.on($G("J_previousStep"), "click", function () {
                if (drawStepIndex > 1) {
                    drawStepIndex -= 1;
Severity: Minor
Found in static/editor/dialogs/scrawl/scrawl.js - About 1 hr to fix

    Function Brush has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function Brush()
        {
            // Contributed by Andres Almiray
            // http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
    
    
    Severity: Minor
    Found in static/editor/third-party/SyntaxHighlighter/shCore.js - About 1 hr to fix

      Method send_request has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function send_request($url) {
      
              if (function_exists('curl_exec')) {
                  $ch = curl_init();
                  curl_setopt($ch, CURLOPT_URL, $url);
      Severity: Minor
      Found in library/Geetestlib.class.php - About 1 hr to fix

        Method cleanAttributes has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function cleanAttributes(DOMElement $elem)
            {
                $tagName = strtolower($elem->nodeName);
                $attributes = $elem->attributes;
                $attributesWhiteList = $this->config->WhiteListHtmlGlobalAttributes;
        Severity: Minor
        Found in library/WhiteHTMLFilter.php - About 1 hr to fix

          Method ExceptionLog has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function ExceptionLog(PDOException $e, $sql = "", $method = '', $parameters = array())
              {
                  $message = $e->getMessage();
                  $exception = 'Unhandled Exception. <br />';
                  $exception .= $message;
          Severity: Minor
          Found in library/PDO.class.php - About 1 hr to fix

            Method translate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function translate(&$ChineseLang, &$CurrentLang, &$CompareFlag, $language_name)
            {
                $diff = array_diff_key($ChineseLang, $CurrentLang);
                if (!empty($diff)) {
                    if ($CompareFlag === false) {
            Severity: Minor
            Found in language/auto_translate.php - About 1 hr to fix

              Function updateGutter has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function updateGutter() {
                          if (!options.gutter && !options.lineNumbers) return;
                          var hText = mover.offsetHeight, hEditor = scroller.clientHeight;
                          gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px";
                          var html = [], i = showingFrom;
              Severity: Minor
              Found in static/editor/third-party/codemirror/codemirror.js - About 1 hr to fix

                Function process has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function process(match, info)
                        {
                            var code = match.code,
                                matches = [],
                                regexList = scriptBrush.regexList,
                Severity: Minor
                Found in static/editor/third-party/SyntaxHighlighter/shCore.js - About 1 hr to fix

                  Function Brush has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function Brush()
                      {
                          // AppleScript brush by David Chambers
                          // http://davidchambersdesign.com/
                          var keywords   = 'after before beginning continue copy each end every from return get global in local named of set some that the then times to where whose with without';
                  Severity: Minor
                  Found in static/editor/third-party/SyntaxHighlighter/shCore.js - About 1 hr to fix

                    Function getImageData has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            getImageData: function(){
                                var _this = this,
                                    key = $G('searchTxt').value,
                                    type = $G('searchType').value,
                                    keepOriginName = editor.options.keepOriginName ? "1" : "0",
                    Severity: Minor
                    Found in static/editor/dialogs/image/image.js - About 1 hr to fix

                      Method edebug has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function edebug($str, $level = 0)
                          {
                              if ($level > $this->do_debug) {
                                  return;
                              }
                      Severity: Minor
                      Found in library/PHPMailer.smtp.class.php - About 1 hr to fix

                        Method edebug has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected function edebug($str)
                            {
                                if ($this->SMTPDebug <= 0) {
                                    return;
                                }
                        Severity: Minor
                        Found in library/PHPMailer.class.php - About 1 hr to fix

                          Function InitEditor has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function InitEditor() {
                              //Initialize editor
                              UE.delEditor('editor');
                              window.UEDITOR_CONFIG['textarea'] = 'Content';
                              window.UEDITOR_CONFIG['elementPathEnabled'] = false;
                          Severity: Minor
                          Found in static/js/default/topic.function.js - About 1 hr 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 ShowNotification has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function ShowNotification(NewMessageNumber) {
                              if (NewMessageNumber > 0) {
                                  document.title = '(' + Lang['New_Message'].replace('{{NewMessage}}', NewMessageNumber) + ')' + document.title.replace(new RegExp(('\\(' + Lang['New_Message'] + '\\)').replace('{{NewMessage}}', '\\d+'), "g"), '');
                                  $("#MessageNumber").css("visibility", "visible");
                                  $("#MessageNumber").html(NewMessageNumber);
                          Severity: Minor
                          Found in static/js/mobile/global.js - About 1 hr 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 ShowNotification has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function ShowNotification(NewMessageNumber) {
                              if (NewMessageNumber > 0) {
                                  document.title = '(' + Lang['New_Message'].replace('{{NewMessage}}', NewMessageNumber) + ')' + document.title.replace(new RegExp(('\\(' + Lang['New_Message'] + '\\)').replace('{{NewMessage}}', '\\d+'), "g"), '');
                                  $("#MessageNumber").css("visibility", "visible");
                                  $("#MessageNumber").html(NewMessageNumber);
                          Severity: Minor
                          Found in static/js/default/global.js - About 1 hr 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 loadMoreMention has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function loadMoreMention(forceToShow) {
                              var MentionedMeList = $("#MentionedMeList");
                              var MentionedMePage = $("#MentionedMePage");
                              var MentionedMeLoading = $("#MentionedMeLoading");
                          
                          
                          Severity: Minor
                          Found in static/js/default/global.js - About 1 hr 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 loadMoreMention has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function loadMoreMention(forceToShow) {
                              var MentionedMeList = $("#MentionedMeList");
                              var MentionedMePage = $("#MentionedMePage");
                              var MentionedMeLoading = $("#MentionedMeLoading");
                          
                          
                          Severity: Minor
                          Found in static/js/mobile/notifications.function.js - About 1 hr 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 loadMoreReply has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function loadMoreReply(forceToShow) {
                              var RepliedToMeList = $("#RepliedToMeList");
                              var RepliedToMePage = $("#RepliedToMePage");
                              var RepliedToMeLoading = $("#RepliedToMeLoading");
                          
                          
                          Severity: Minor
                          Found in static/js/mobile/notifications.function.js - About 1 hr 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 loadMoreInbox has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function loadMoreInbox(forceToShow) {
                              var InboxList = $("#InboxList");
                              var InboxPage = $("#InboxPage");
                              var InboxLoading = $("#InboxLoading");
                              if (forceToShow || (InboxList.is(":visible") && InboxLoading.val() !== "1")) {
                          Severity: Minor
                          Found in static/js/mobile/notifications.function.js - About 1 hr 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 loadMoreReply has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function loadMoreReply(forceToShow) {
                              var RepliedToMeList = $("#RepliedToMeList");
                              var RepliedToMePage = $("#RepliedToMePage");
                              var RepliedToMeLoading = $("#RepliedToMeLoading");
                          
                          
                          Severity: Minor
                          Found in static/js/default/global.js - About 1 hr 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