YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function registerFilterForm has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    registerFilterForm(container) {
        const self = this;
        if (container.find('.js-filter__search').length) {
            container.find('.js-filter__search').on('keyup', this.findElementOnList.bind(self));
        }
Severity: Minor
Found in public_html/layouts/resources/Calendar.js - About 1 hr to fix

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

            this.bind = function () {
                parent.bind.call(this);
                this.element.on(
                    'select_node.jstree',
                    $.proxy(function (obj, data) {
    Severity: Minor
    Found in public_html/layouts/resources/libraries/jstree.edit.js - About 1 hr to fix

      Function setCalendarMinimalOptions has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          setCalendarMinimalOptions() {
              let hiddenDays = [];
              if (app.getMainParams('switchingDays') === 'workDays') {
                  hiddenDays = app.getMainParams('hiddenDays', true);
              }
      Severity: Minor
      Found in public_html/layouts/resources/Calendar.js - About 1 hr to fix

        Function registerIframeAndMoreContent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            registerIframeAndMoreContent(container = $(document)) {
                container.on('click', '.js-more', (e) => {
                    e.preventDefault();
                    e.stopPropagation();
                    const btn = $(e.currentTarget);
        Severity: Minor
        Found in public_html/layouts/resources/app.js - About 1 hr to fix

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

              public function import($zipfile, $overwrite = false)
              {
                  $module = $this->getModuleNameFromZip($zipfile);
                  if (null !== $module) {
                      $zip = \App\Zip::openFile($zipfile, ['checkFiles' => false]);
          Severity: Minor
          Found in vtlib/Vtiger/PackageImport.php - About 1 hr to fix

            Method transferOwnershipForWorkflow has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private static function transferOwnershipForWorkflow($oldId, $newId)
                {
                    $db = \App\Db::getInstance();
                    $ownerName = static::getLabel($oldId);
                    $newOwnerName = static::getLabel($newId);
            Severity: Minor
            Found in app/Fields/Owner.php - About 1 hr to fix

              Method relations has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function relations(int $sourceId, array $records)
                  {
                      $sourceRecord = \Vtiger_Record_Model::getInstanceById($sourceId);
                      foreach ($records as $recordId) {
                          $recordModel = \Vtiger_Record_Model::getInstanceById($recordId);
              Severity: Minor
              Found in app/RecordTransfer.php - About 1 hr to fix

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

                    public function process(App\Request $request)
                    {
                        $response = new Vtiger_Response();
                        $bruteForceInstance = Settings_BruteForce_Module_Model::getCleanInstance();
                        try {
                Severity: Minor
                Found in modules/Users/actions/LoginForgotPassword.php - About 1 hr to fix

                  Method importUserModuleStep2 has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function importUserModuleStep2(App\Request $request)
                      {
                          $viewer = $this->getViewer($request);
                          $uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
                          $qualifiedModuleName = $request->getModule(false);
                  Severity: Minor
                  Found in modules/Settings/ModuleManager/views/ModuleImport.php - About 1 hr to fix

                    Method mailScan has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function mailScan($mbox, array $account, string $folder, int $scan_id, int $countEmails)
                        {
                            $break = false;
                            $lastScanUid = self::getUidFolder($account['user_id'], $folder);
                            \App\Log::beginProfile(__METHOD__ . '|imap_msgno', 'Mail|IMAP');
                    Severity: Minor
                    Found in modules/OSSMailScanner/models/Record.php - About 1 hr to fix

                      Method getHistory has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getHistory($pagingModel, $type = false)
                          {
                              if (empty($type)) {
                                  $type = 'all';
                              }
                      Severity: Minor
                      Found in modules/Home/models/Module.php - About 1 hr to fix

                        Method getAll has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function getAll($moduleName = '', bool $fromFile = true)
                            {
                                $currentUser = \App\User::getCurrentUserModel();
                                $cacheName = "{$moduleName}_{$currentUser->getId()}_{$fromFile}";
                                if (App\Cache::has('getAllFilters', $cacheName)) {
                        Severity: Minor
                        Found in modules/CustomView/models/Record.php - About 1 hr to fix

                          Method getLeadsByStatus has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getLeadsByStatus($owner, $dateFilter)
                              {
                                  $leadsClosed = Settings_MarketingProcesses_Module_Model::getConfig('lead');
                                  $query = new \App\Db\Query();
                                  $query->select([
                          Severity: Minor
                          Found in modules/Leads/dashboards/LeadsByStatus.php - About 1 hr to fix

                            Function importView has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                importView() {
                                    AppConnector.request({ view: 'Import', ...this.getDefaultParams() }).done((modal) => {
                                        app.showModalWindow(modal, (container) => {
                                            container.find('.js-modal__save').on('click', () => {
                                                let form = container.find('form');

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

                                      registerEvents: function (container) {
                                          var thisInstance = this;
                                          this.loadWidgets();
                                          if (typeof container === 'undefined') {
                                              container = jQuery('.WidgetsManage');

                                Function submit has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        submit: function () {
                                            var aDeferred = jQuery.Deferred();
                                            var form = this.getContainer();
                                            var formData = form.serializeFormData();
                                            formData['async'] = false;

                                  Function getData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          getData(callback) {
                                              const progressIndicatorElement = jQuery.progressIndicator({
                                                  position: 'html',
                                                  blockInfo: {
                                                      enabled: true

                                    Function loadConditions has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            loadConditions: function (fieldSelect) {
                                                let row = fieldSelect.closest('div.js-conditions-row');
                                                let conditionSelectElement = row.find('select[name="comparator"]');
                                                let conditionSelected = conditionSelectElement.val();
                                                let fieldSelected = fieldSelect.find('option:selected');

                                      Function checkMails has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function checkMails(users, initial = false) {
                                          let reloadSelect = false;
                                          AppConnector.request({
                                              module: 'OSSMail',
                                              action: 'CheckMails',
                                      Severity: Minor
                                      Found in public_html/layouts/basic/modules/OSSMail/resources/checkmails.js - About 1 hr to fix

                                        Function addRssWidget has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                addRssWidget: function (element, url) {
                                                    var thisInstance = this;
                                                    var objectToShowModal = {
                                                        url: 'index.php?module=' + app.getModuleName() + '&parent=' + app.getParentModuleName() + '&view=AddRss',
                                                        cb: function (container) {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language