qcminecraft/Carbon-Forum-F

View on GitHub

Showing 506 of 851 total issues

Function highlight has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        highlight: function(globalParams, element)
        {
            var elements = this.findElements(globalParams, element),
                propertyName = 'innerHTML',
                highlighter = null,
Severity: Minor
Found in static/editor/third-party/SyntaxHighlighter/shCore.js - About 1 hr to fix

    Function renderCharts has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function renderCharts () {
    
        var data = collectData();
    
        $('#chartsContainer').highcharts( $.extend( {}, chartsConfig[ currentChartType ], {
    Severity: Minor
    Found in static/editor/dialogs/charts/charts.js - About 1 hr to fix

      Function ReplyToTopic has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      function ReplyToTopic() {
          if (!UE.getEditor('editor').getContent().length) {
              alert(Lang['Content_Empty']);
              UE.getEditor('editor').focus();
          } else {
      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 addOkListener has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      function addOkListener() {
          dialog.onok = function() {
              if (!imageUrls.length) return;
              var urlPrefix = editor.getOpt('imageUrlPrefix'),
                  images = domUtils.getElementsByTagName(editor.document,"img");
      Severity: Minor
      Found in static/editor/dialogs/wordimage/wordimage.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 cleanAttributes has a Cognitive Complexity of 14 (exceeds 5 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

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

          public function SetSource($source, $source_charset = 'utf-8', $target_charset = 'utf-8')
          {
              $this->sourceCharSet = strtolower($source_charset);
              $this->targetCharSet = strtolower($target_charset);
              $this->simpleResult  = array();
      Severity: Minor
      Found in library/PHPAnalysis.class.php - 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 GetNextSQL has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      function GetNextSQL()
      {
          global $fp;
          $sql = "";
          while ($line = fgets($fp, 40960)) {
      Severity: Minor
      Found in install/index.php - 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 GetFinallyResult has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          public function GetFinallyResult($spword = ' ', $word_meanings = false)
          {
              $rsstr = '';
              foreach ($this->finallyResult as $v) {
                  if ($this->resultType == 2 && ($v['t'] == 3 || $v['t'] == 5)) {
      Severity: Minor
      Found in library/PHPAnalysis.class.php - 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 encodeHeader has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          public function encodeHeader($str, $position = 'text')
          {
              $matchcount = 0;
              switch (strtolower($position)) {
                  case 'phrase':
      Severity: Minor
      Found in library/PHPMailer.class.php - 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 inText has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function inText(stream, state) {
              function chain(parser) {
                  state.tokenize = parser;
                  return parser(stream, state);
              }
      Severity: Minor
      Found in static/editor/third-party/codemirror/codemirror.js - About 1 hr to fix

        Method encodeHeader has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function encodeHeader($str, $position = 'text')
            {
                $matchcount = 0;
                switch (strtolower($position)) {
                    case 'phrase':
        Severity: Minor
        Found in library/PHPMailer.class.php - About 1 hr to fix

          Function initGeetest has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var initGeetest = function (userConfig, callback) {
                  var config = new Config(userConfig);
                  if (userConfig.https) {
                      config.protocol = 'https://';
                  } else if (!userConfig.protocol) {
          Severity: Minor
          Found in static/js/gt.js - About 1 hr to fix

            Method data has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function data($msg_data)
                {
                    //This will use the standard timelimit
                    if (!$this->sendCommand('DATA', 'DATA', 354)) {
                        return false;
            Severity: Minor
            Found in library/PHPMailer.smtp.class.php - About 1 hr to fix

              Function Manage has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Manage(ID, Type, Action, NeedToConfirm, TargetTag) {
                  if(NeedToConfirm){
                      $.afui.popup({
                          title: Lang['Confirm'],
                          message: Lang['Confirm_Operation'],
              Severity: Minor
              Found in static/js/mobile/global.js - About 1 hr to fix

                Function initEvent has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function initEvent () {
                
                    var cacheValue = null,
                        //图表类型数
                        typeViewCount = chartsConfig.length- 1,
                Severity: Minor
                Found in static/editor/dialogs/charts/charts.js - About 1 hr to fix

                  Method sendCommand has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      protected function sendCommand($command, $commandstring, $expect)
                      {
                          if (!$this->connected()) {
                              $this->setError("Called $command without being connected");
                              return false;
                  Severity: Minor
                  Found in library/PHPMailer.smtp.class.php - About 1 hr to fix

                    Function version has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                    baidu.swf.version = (function () {
                        var n = navigator;
                        if (n.plugins && n.mimeTypes.length) {
                            var plugin = n.plugins["Shockwave Flash"];
                            if (plugin && plugin.description) {
                    Severity: Minor
                    Found in static/editor/dialogs/wordimage/tangram.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 stringify has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                    baidu.json.stringify = (function () {
                        /**
                         * 字符串处理时需要转义的字符表
                         * @private
                         */
                    Severity: Minor
                    Found in static/editor/dialogs/wordimage/tangram.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 DKIM_Add has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function DKIM_Add($headers_line, $subject, $body)
                        {
                            $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms
                            $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
                            $DKIMquery = 'dns/txt'; // Query method
                    Severity: Minor
                    Found in library/PHPMailer.class.php - 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 Filter has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function Filter($Content)
                    {
                        if (is_file(LibraryPath . 'Filtering.words.config.json')) {
                            $FilteringWords = JsonDecode(file_get_contents(LibraryPath . 'Filtering.words.config.json'));
                        } else {
                    Severity: Minor
                    Found in common.php - 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