YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function registerMailPreviewWidget has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        registerMailPreviewWidget: function (container) {
            const self = this;
            container.on('click', '.showMailBody', (e) => {
                let row = $(e.currentTarget).closest('.js-mail-row'),
                    mailBody = row.find('.mailBody'),
Severity: Major
Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 2 hrs to fix

    Function calculateDiscount has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            calculateDiscount: function (_row, modal) {
                const netPriceBeforeDiscount = App.Fields.Double.formatToDb(modal.find('.valueTotalPrice').text()),
                    discountsType = modal.find('.discountsType').val();
                let valuePrices = netPriceBeforeDiscount,
                    globalDiscount = 0,
    Severity: Major
    Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 2 hrs to fix

      Method importInventory has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function importInventory()
          {
              if (1 !== $this->moduleInstance->type) {
                  return false;
              }
      Severity: Major
      Found in vtlib/Vtiger/PackageImport.php - About 2 hrs to fix

        Method createUserSharingPrivilegesfile has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function createUserSharingPrivilegesfile($userid)
            {
                \vtlib\Deprecated::checkFileAccessForInclusion('user_privileges/user_privileges_' . $userid . '.php');
                require 'user_privileges/user_privileges_' . $userid . '.php';
                $fileUserSharingPrivileges = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'user_privileges/sharing_privileges_' . $userid . '.php';
        Severity: Major
        Found in app/UserPrivilegesFile.php - About 2 hrs to fix

          Method loadJsConfig has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function loadJsConfig(\App\Request $request)
              {
                  $jsEnv = [
                      'skinPath' => \Vtiger_Theme::getCurrentUserThemePath(),
                      'siteUrl' => \App\Layout::getPublicUrl('', true),
          Severity: Major
          Found in app/Controller/View/Base.php - About 2 hrs to fix

            Method getConfirmResponse has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getConfirmResponse(\App\Request $request): array
                {
                    $queries = [
                        'base' => $this->getConfirmQuery($request, 'u'),
                    ];
            Severity: Major
            Found in app/Controller/Components/Action/InterestsConflict.php - About 2 hrs to fix

              Method createTimeZone has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function createTimeZone($tzid, $from = 0, $to = 0)
                  {
                      if (!$from) {
                          $from = time();
                      }
              Severity: Major
              Found in app/Integrations/Dav/Calendar.php - About 2 hrs to fix

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

                    public function process(App\Request $request)
                    {
                        $type = $request->getByType('type', 1);
                        $range = $request->getByType('range', 'DateRangeUserFormat');
                        if (!isset(App\Log::$owaspColumnMapping[$type])) {
                Severity: Major
                Found in modules/Settings/Log/actions/LogsOwasp.php - About 2 hrs to fix

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

                  <?php
                  
                  /**
                   * Automatic assignment module model class.
                   *
                  Severity: Minor
                  Found in modules/Settings/AutomaticAssignment/models/Module.php - About 2 hrs to fix

                    Method getSearchComments has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function getSearchComments(int $parentId, $moduleName, string $searchValue, bool $isWidget, array $hierarchy = [], Vtiger_Paging_Model $pagingModel = null)
                        {
                            $fields = array_merge(array_keys(\App\Field::getModuleFieldInfosByPresence('ModComments')), ['id']);
                            $queryGenerator = new \App\QueryGenerator('ModComments');
                            $queryGenerator->setFields($fields);
                    Severity: Major
                    Found in modules/ModComments/models/Record.php - About 2 hrs to fix

                      Method setRelatedParent has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function setRelatedParent(App\Request $request)
                          {
                              $filterFields = $request->getArray('filterFields', 'Text');
                              if (!($relationId = $request->isEmpty('relationId') ? 0 : $request->getInteger('relationId')) && $this->sourceField) {
                                  $relationId = \App\Relation::getRelationId($this->moduleName, $this->sourceModule, $this->sourceField);
                      Severity: Major
                      Found in modules/Vtiger/views/RecordsList.php - About 2 hrs to fix

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

                            public function process(App\Request $request)
                            {
                                $currentUser = Users_Record_Model::getCurrentUserModel();
                                $moduleName = 'Home';
                                $page = $request->getInteger('page');
                        Severity: Major
                        Found in modules/Vtiger/dashboards/CreatedNotMineOverdueActivities.php - About 2 hrs to fix

                          File Reference.php has 259 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: Minor
                          Found in modules/Vtiger/uitypes/Reference.php - About 2 hrs to fix

                            Function checkReferencesField has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    checkReferencesField: function (container, clear) {
                                        let thisInstance = this;
                                        let activeProcess = false,
                                            activeSubProcess = false;
                                        if (!CONFIG.fieldsReferencesDependent) {
                            Severity: Major
                            Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 2 hrs to fix

                              Function copyAddress has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      copyAddress: function (fromLabel, toLabel, relatedRecord, sourceModule) {
                                          const thisInstance = this;
                                          let formElement = this.getForm(),
                                              status = false,
                                              addressMapping = this.addressFieldsMapping,
                              Severity: Major
                              Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 2 hrs to fix

                                Function zoomPreview has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    zoomPreview(hash) {
                                        const self = this;
                                        let fileInfo = this.getFileInfo(hash);
                                        const titleTemplate = () => {
                                            const titleObject = document.createElement('span');
                                Severity: Major
                                Found in public_html/layouts/resources/fields/MultiImage.js - About 2 hrs to fix

                                  Method getRelatedVariable has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getRelatedVariable($fieldType = false, $skipEmpty = false)
                                      {
                                          $cacheKey = "{$this->moduleName}|$fieldType|{$skipEmpty}";
                                          if (isset(static::$relatedVariable[$cacheKey])) {
                                              return static::$relatedVariable[$cacheKey];
                                  Severity: Major
                                  Found in app/TextParser.php - About 2 hrs to fix

                                    Method getQueryInitUsers has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getQueryInitUsers($private = false, $status = false, $roles = false)
                                        {
                                            $entityData = \App\Module::getEntityInfo('Users');
                                            $selectFields = array_unique(array_merge($entityData['fieldnameArr'], ['id' => 'id', 'is_admin', 'cal_color', 'status']));
                                            // Including deleted vtiger_users for now.
                                    Severity: Major
                                    Found in app/Fields/Owner.php - About 2 hrs to fix

                                      Method import has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function import(): bool
                                          {
                                              $allChecked = false;
                                              try {
                                                  if ($orders = $this->getOrdersFromApi()) {
                                      Severity: Major
                                      Found in app/Integrations/Magento/Synchronizer/Order.php - About 2 hrs to fix

                                        Method activate has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static function activate(): bool
                                            {
                                                $importer = new \App\Db\Importers\Base();
                                                $db = \App\Db::getInstance();
                                                if (!$db->isTableExists(\App\Integrations\Wapro::RECORDS_MAP_TABLE_NAME)) {
                                        Severity: Major
                                        Found in modules/Settings/Wapro/models/Activation.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language