YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

File Relation.php has 795 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/* +***********************************************************************************
 * The contents of this file are subject to the vtiger CRM Public License Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
Severity: Major
Found in modules/Vtiger/models/Relation.php - About 1 day to fix

    File Edit3.js has 787 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*+***********************************************************************************
     * The contents of this file are subject to the vtiger CRM Public License Version 1.0
     * ("License"); You may not use this file except in compliance with the License
     * The Original Code is:  vtiger CRM Open Source
     * The Initial Developer of the Original Code is vtiger.

      File Record.php has 786 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
       /* +***********************************************************************************
       * The contents of this file are subject to the vtiger CRM Public License Version 1.0
       * ("License"); You may not use this file except in compliance with the License
      Severity: Major
      Found in modules/Users/models/Record.php - About 1 day to fix

        Function bind has 371 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                this.bind = function () {
                    parent.bind.call(this);
                    this._data.checkbox.uto = false;
                    this._data.checkbox.selected = [];
                    this.element
        Severity: Major
        Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 day to fix

          Vtiger_Field_Model has 97 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Vtiger_Field_Model extends vtlib\Field
          {
              const REFERENCE_TYPE = 'reference';
              const OWNER_TYPE = 'owner';
              const CURRENCY_LIST = 'currencyList';
          Severity: Major
          Found in modules/Vtiger/models/Field.php - About 1 day to fix

            File ChartFilter.php has 773 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Model widget chart with a filter.
             *
             * @package Model
            Severity: Major
            Found in modules/Vtiger/models/ChartFilter.php - About 1 day to fix

              `` has 93 functions (exceeds 20 allowed). Consider refactoring.
              Open

                  {
                      targetPicklistChange: false,
                      targetPicklist: false,
                      detailViewContentHolder: false,
                      detailViewForm: false,
              Severity: Major
              Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 1 day to fix

                File Calendar.js has 745 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */
                'use strict';
                
                /** Class representing a calendar. */
                window.Calendar_Js = class {
                Severity: Major
                Found in public_html/layouts/resources/Calendar.js - About 1 day to fix

                  File Calendar.php has 741 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * CalDav calendar file.
                   *
                   * @package Integration
                  Severity: Major
                  Found in app/Integrations/Dav/Calendar.php - About 1 day to fix

                    Function getInventoryTable has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function getInventoryTable(array $config): string
                        {
                            $rawText = empty($config['href']) || 'yes' !== $config['href'];
                            $inventory = \Vtiger_Inventory_Model::getInstance($this->moduleName);
                            $fields = $inventory->getFieldsByBlocks();
                    Severity: Minor
                    Found in app/TextParser.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

                    File Module.php has 720 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /* +**********************************************************************************
                     * The contents of this file are subject to the vtiger CRM Public License Version 1.1
                     * ("License"); You may not use this file except in compliance with the License
                     * The Original Code is:  vtiger CRM Open Source
                    Severity: Major
                    Found in modules/Settings/LayoutEditor/models/Module.php - About 1 day to fix

                      Function getValuesFromSource has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getValuesFromSource(App\Request $request, $moduleName = false)
                          {
                              $sourceModule = $request->getByType('sourceModule', 2);
                              if (
                                  empty($sourceModule)
                      Severity: Minor
                      Found in modules/Vtiger/models/Module.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 getStructure has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getStructure()
                          {
                              if (!empty($this->structuredValues)) {
                                  return $this->structuredValues;
                              }
                      Severity: Minor
                      Found in modules/Users/models/EditRecordStructure.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 getRates has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getRates($otherCurrencyCode, $dateParam, $cron = false)
                          {
                              $moduleModel = Settings_CurrencyUpdate_Module_Model::getCleanInstance();
                              $selectedBank = $moduleModel->getActiveBankId();
                              $yesterday = date('Y-m-d', strtotime('-1 day'));
                      Severity: Minor
                      Found in modules/Settings/CurrencyUpdate/bankmodels/NBR.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

                      File Rbl.php has 693 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      /**
                       * Mail RBL file.
                       *
                       * @package App
                      Severity: Major
                      Found in app/Mail/Rbl.php - About 1 day to fix

                        Vtiger_Record_Model has 83 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Vtiger_Record_Model extends \App\Base
                        {
                            /**
                             * @var string Record label
                             */
                        Severity: Major
                        Found in modules/Vtiger/models/Record.php - About 1 day to fix

                          Vtiger_Module_Model has 83 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Vtiger_Module_Model extends \vtlib\Module
                          {
                              /** Standard module type */
                              const STANDARD_TYPE = 0;
                              /** Advanced module type */
                          Severity: Major
                          Found in modules/Vtiger/models/Module.php - About 1 day to fix

                            Function registerBasicEvents has 311 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    registerBasicEvents: function () {
                                        let thisInstance = this;
                                        let detailContentsHolder = thisInstance.getContentHolder();
                                        let selectedTabElement = thisInstance.getSelectedTab();
                                        //register all the events for summary view container
                            Severity: Major
                            Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 1 day to fix

                              `` has 82 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                                  {
                                      //contains the List View element.
                                      listViewContainer: false,
                                      //Contains list view top menu element
                                      listViewTopMenuContainer: false,
                              Severity: Major
                              Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 day to fix

                                Function registerBasicModal has 305 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        registerBasicModal: function () {
                                            var thisInstance = this;
                                            var container = this.container;
                                            var map = thisInstance.mapInstance;
                                            var layer, description;
                                Severity: Major
                                Found in public_html/layouts/basic/modules/OpenStreetMap/resources/Map.js - About 1 day to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language