qcminecraft/Carbon-Forum-F

View on GitHub

Showing 506 of 851 total issues

Function initUploader has 363 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        initUploader: function () {
            var _this = this,
                $ = jQuery,    // just in case. Make sure it's not an other libaray.
                $wrap = _this.$wrap,
            // 图片容器
Severity: Major
Found in static/editor/dialogs/video/video.js - About 1 day to fix

    File ru.js has 770 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Carbon-Forum-F
     * https://github.com/lincanbin/Carbon-Forum
     *
     * Copyright 2006-2017 Canbin Lin (lincanbin@hotmail.com)
    Severity: Major
    Found in language/ru/ru.js - About 1 day to fix

      Function initUploader has 359 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              initUploader: function () {
                  var _this = this,
                      $ = jQuery,    // just in case. Make sure it's not an other libaray.
                      $wrap = _this.$wrap,
                  // 图片容器
      Severity: Major
      Found in static/editor/dialogs/attachment/attachment.js - About 1 day to fix

        File tangram.js has 674 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // Copyright (c) 2009, Baidu Inc. All rights reserved.
        // 
        // Licensed under the BSD License
        // you may not use this file except in compliance with the License.
        // You may obtain a copy of the License at
        Severity: Major
        Found in static/editor/dialogs/wordimage/tangram.js - About 1 day to fix

          File common.php has 668 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /*
           * Carbon-Forum-F
           * https://github.com/lincanbin/Carbon-Forum
           *
          Severity: Major
          Found in common.php - About 1 day to fix

            Method Initialize has 300 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function Initialize()
                {
                    //extension_loaded('gd')
                    $Width  = $this->AvatarSize;//Width of avatar
                    $Height = $this->AvatarSize;//Height of avatar
            Severity: Major
            Found in library/MaterialDesign.Avatars.class.php - About 1 day to fix

              File attachment.js has 625 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /**
               * User: Jinqn
               * Date: 14-04-08
               * Time: 下午16:34
               * 上传图片对话框逻辑代码,包括tab: 远程图片/上传图片/在线图片/搜索图片
              Severity: Major
              Found in static/editor/dialogs/attachment/attachment.js - About 1 day to fix

                File video.js has 622 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Created by JetBrains PhpStorm.
                 * User: taoqili
                 * Date: 12-2-20
                 * Time: 上午11:19
                Severity: Major
                Found in static/editor/dialogs/video/video.js - About 1 day to fix

                  File scrawl.js has 616 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /**
                   * Created with JetBrains PhpStorm.
                   * User: xuheng
                   * Date: 12-5-22
                   * Time: 上午11:38
                  Severity: Major
                  Found in static/editor/dialogs/scrawl/scrawl.js - About 1 day to fix

                    File PHPMailer.smtp.class.php has 614 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * PHPMailer RFC821 SMTP email transport class.
                     * PHP Version 5
                     * @package PHPMailer
                    Severity: Major
                    Found in library/PHPMailer.smtp.class.php - About 1 day to fix

                      File manage.php has 574 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      require(LanguagePath . 'manage.php');
                      SetStyle('api', 'API');
                      
                      $ID     = intval(Request('Post', 'ID', 0));
                      Severity: Major
                      Found in controller/manage.php - About 1 day to fix

                        Function wrapText has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function wrapText($message, $length, $qp_mode = false)
                            {
                                if ($qp_mode) {
                                    $soft_break = sprintf(' =%s', $this->LE);
                                } else {
                        Severity: Minor
                        Found in library/PHPMailer.class.php - About 1 day 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 attachAll has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function attachAll($disposition_type, $boundary)
                            {
                                // Return text of body
                                $mime = array();
                                $cidUniq = array();
                        Severity: Minor
                        Found in library/PHPMailer.class.php - About 1 day 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 __construct has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                        Open

                            function __construct($Char, $AvatarSize = 256)
                            {
                                $this->Char = strtoupper(mb_substr($Char, 0, 1, "UTF-8"));
                                $this->AvatarSize = $AvatarSize;
                                $this->Padding = 30*($this->AvatarSize/256);
                        Severity: Minor
                        Found in library/MaterialDesign.Avatars.class.php - About 7 hrs 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

                        File global.js has 480 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*
                         * Carbon-Forum
                         * https://github.com/lincanbin/Carbon-Forum
                         *
                         * Copyright 2006-2017 Canbin Lin (lincanbin@hotmail.com)
                        Severity: Minor
                        Found in static/js/mobile/global.js - About 7 hrs to fix

                          Method createBody has 181 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function createBody()
                              {
                                  $body = '';
                                  //Create unique IDs and preset boundaries
                                  $this->uniqueid = md5(uniqid(time()));
                          Severity: Major
                          Found in library/PHPMailer.class.php - About 7 hrs to fix

                            File dashboard.php has 462 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            if (!defined('InternalAccess')) exit('error: 403 Access Denied');
                            
                            function GenerateSelect($Options, $Name)
                            {
                            Severity: Minor
                            Found in view/default/dashboard.php - About 7 hrs to fix

                              Function smtpConnect has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function smtpConnect($options = null)
                                  {
                                      if (is_null($this->smtp)) {
                                          $this->smtp = $this->getSMTPInstance();
                                      }
                              Severity: Minor
                              Found in library/PHPMailer.class.php - About 6 hrs 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

                              Method StartAnalysis has 151 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function StartAnalysis($optimize = true)
                                  {
                                      if (!$this->isLoadDic) {
                                          $this->LoadDict();
                                      }
                              Severity: Major
                              Found in library/PHPAnalysis.class.php - About 6 hrs to fix

                                Method _optimize_result has 149 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function _optimize_result(&$smarr, $spos)
                                    {
                                        $newarr = array();
                                        $prePos = $spos - 1;
                                        $arlen  = count($smarr);
                                Severity: Major
                                Found in library/PHPAnalysis.class.php - About 5 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language