YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

File FieldBasic.php has 279 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: Minor
Found in vtlib/Vtiger/FieldBasic.php - About 2 hrs to fix

    Function registerFieldTypeChangeEvent has 67 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            registerFieldTypeChangeEvent(form) {
                var thisInstance = this;
                var lengthInput = form.find('[name="fieldLength"]');
    
                //special validators while adding new field

      Function callback has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      callback = function (data) {
                          let treeInstance = data.find('#treeWorkflowContents');
                          treeInstance.jstree({
                              core: {
                                  data: JSON.parse(data.find('.js-tree-workflow-data').val()),
      Severity: Major
      Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 2 hrs to fix

        Method recalculatePasswords has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function recalculatePasswords(string $method, string $password, string $vector)
            {
                $dbAdmin = \App\Db::getInstance('admin');
                $decryptInstance = static::getInstance();
                if ($decryptInstance->get('method') === $method && $decryptInstance->get('vector') === $vector && $decryptInstance->get('pass') === $password) {
        Severity: Major
        Found in app/Encryptions/Settings.php - About 2 hrs to fix

          Method isReadWritePermittedBySharing has 67 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function isReadWritePermittedBySharing($moduleName, $tabId, $actionId, $recordId, $userId)
              {
                  \App\Log::trace("Entering isReadWritePermittedBySharing($moduleName,$tabId,$actionId,$recordId,$userId) method ...");
                  $sharingPrivileges = \App\User::getSharingFile($userId);
                  if (!isset($sharingPrivileges['permission'][$moduleName])) {
          Severity: Major
          Found in app/Privilege.php - About 2 hrs to fix

            Method addData has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function addData(Base $importer)
                {
                    if (!isset($importer->data)) {
                        return;
                    }
            Severity: Major
            Found in app/Db/Importer.php - About 2 hrs to fix

              Method getFieldInstanceByName has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getFieldInstanceByName($name)
                  {
                      $moduleName = $this->getModule()->getName(true);
                      $fieldsLabel = $this->getEditFields();
                      $params = ['uitype' => 1, 'column' => $name, 'name' => $name, 'label' => $fieldsLabel[$name], 'displaytype' => 1, 'typeofdata' => 'V~M', 'presence' => 0, 'isEditableReadOnly' => false];
              Severity: Major
              Found in modules/Settings/WebserviceUsers/services/WebserviceStandard.php - About 2 hrs to fix

                Method getMenu has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function getMenu(string $moduleName, string $view, string $mode = '', &$selected = null): array
                    {
                        $selectedFieldId = 0;
                        $selectedBlockId = 0;
                        $menu = [];
                Severity: Major
                Found in modules/Settings/Vtiger/models/Menu.php - About 2 hrs to fix

                  Method process has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function process()
                      {
                          \App\Log::trace('Start SendReminder');
                          $dataReader = (new \App\Db\Query())->select([
                              'vtiger_crmentity.smownerid',
                  Severity: Major
                  Found in modules/Calendar/crons/SendReminder.php - About 2 hrs to fix

                    Method process has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function process()
                        {
                            $limit = App\Config::performance('CRON_MAX_NUMBERS_RECORD_PRIVILEGES_UPDATER');
                            $query = (new \App\Db\Query())->select(['crmid', 'setype'])
                                ->from('vtiger_crmentity')
                    Severity: Major
                    Found in modules/Vtiger/crons/PrivilegesUpdater.php - About 2 hrs to fix

                      File Detail.js has 278 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.
                      Severity: Minor
                      Found in public_html/layouts/basic/modules/Leads/resources/Detail.js - About 2 hrs to fix

                        PackageExport has 24 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class PackageExport
                        {
                            public $_export_tmpdir = 'cache/vtlib';
                            public $_export_modulexml_filename;
                            public $_export_modulexml_file;
                        Severity: Minor
                        Found in vtlib/Vtiger/PackageExport.php - About 2 hrs to fix

                          Functions has 24 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Functions
                          {
                              public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                              {
                                  if (\App\Cache::has('moduleTabs', 'all')) {
                          Severity: Minor
                          Found in vtlib/Vtiger/Functions.php - About 2 hrs to fix

                            Import_Data_Action has 24 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class Import_Data_Action extends \App\Controller\Action
                            {
                                public $id;
                                public $user;
                                public $module;
                            Severity: Minor
                            Found in modules/Import/actions/Data.php - About 2 hrs to fix

                              Function registerEvents has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      registerEvents: function () {
                                          const thisInstance = this;
                                          let contentTable = thisInstance.getContentTable(),
                                              contentContainer = thisInstance.getContentContainer();
                                          thisInstance.registerSharingAccessEdit();

                                Function registerSplit has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        registerSplit: function (container) {
                                            let rightSplitMaxWidth = (400 / this.windowW) * 100;
                                            const splitSizes = this.getSplitSizes();
                                            app.moduleCacheSet('gutterRelatedMidPosition', splitSizes);
                                            let split = Split([this.list[0], this.preview[0]], {
                                Severity: Major
                                Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 2 hrs to fix

                                  Function saveFieldValues has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          saveFieldValues: function (fieldDetailList) {
                                              const self = this;
                                              var aDeferred = jQuery.Deferred();
                                              const recordId = app.getRecordId();
                                              var data = {};
                                  Severity: Major
                                  Found in public_html/layouts/basic/modules/HelpDesk/resources/Detail.js - About 2 hrs to fix

                                    Function showSelect2ElementView has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            showSelect2ElementView(selectElement, params) {
                                                let self = this;
                                                selectElement = $(selectElement);
                                                if (typeof params === 'undefined') {
                                                    params = {};
                                    Severity: Major
                                    Found in public_html/layouts/resources/Fields.js - About 2 hrs to fix

                                      Function register has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              register(parentElement, registerForAddon, customParams, className = 'dateField') {
                                                  if (typeof parentElement === 'undefined') {
                                                      parentElement = $('body');
                                                  } else {
                                                      parentElement = $(parentElement);
                                      Severity: Major
                                      Found in public_html/layouts/resources/Fields.js - About 2 hrs to fix

                                        Function init has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                    init(params) {
                                                        let css = {
                                                            border: this.container.css('border'),
                                                            opacity: 'unset'
                                                        };
                                        Severity: Major
                                        Found in public_html/layouts/resources/app.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language