YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function registerSectionClick has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        registerSectionClick: function registerSectionClick() {
            const thisInstance = this;
            let pointer = false;
            $(thisInstance.chartInstance.canvas)
                .on('click', function (e) {

    Function registerStep3 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            registerStep3(stepContainer) {
                this.step3.append(stepContainer);
                this.stepNumber.val(3);
                App.Fields.Picklist.showSelect2ElementView(this.step3.find('select'));
                this.footer.hide();

      Function setDefaultGlobalTax has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              setDefaultGlobalTax: function () {
                  let thisInstance = this;
                  let parentRow = thisInstance.getInventoryItemsContainer();
                  let taxDefaultValue = thisInstance
                      .getInventorySummaryTaxesContainer()
      Severity: Minor
      Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 1 hr to fix

        Function is_undetermined has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                this.is_undetermined = function (obj) {
                    obj = this.get_node(obj);
                    var s = this.settings.checkbox.cascade,
                        i,
                        j,
        Severity: Minor
        Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 hr to fix

          Function activate_node has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  this.activate_node = function (obj, e) {
                      if ($(e.target).hasClass('jstree-checkbox-disabled')) {
                          return false;
                      }
                      if (this.get_node(obj).original.type == 'category') {
          Severity: Minor
          Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 hr to fix

            Function registerEnableCurrencyEvent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    registerEnableCurrencyEvent(container) {
                        container.on('change', '.js-enable-currency', (e) => {
                            let element = $(e.currentTarget);
                            let parentRow = element.closest('tr');
                            if (element.is(':checked')) {
            Severity: Minor
            Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

              Function redraw_node has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      this.redraw_node = function (obj, deep, is_callback, force_render) {
                          obj = parent.redraw_node.apply(this, arguments);
                          if (obj) {
                              var i,
                                  j,
              Severity: Minor
              Found in public_html/layouts/resources/libraries/jstree.category.js - About 1 hr to fix

                Function redraw_node has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        this.redraw_node = function (obj, deep, is_callback, force_render) {
                            obj = parent.redraw_node.apply(this, arguments);
                            if (obj) {
                                var i,
                                    j,
                Severity: Minor
                Found in public_html/layouts/resources/libraries/jstree.edit.js - About 1 hr to fix

                  Function getMentionData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          getMentionData(text, callback, searchModule = '-') {
                              let basicSearch = new Vtiger_BasicSearch_Js();
                              basicSearch.reduceNumberResults = app.getMainParams('gsAmountResponse');
                              basicSearch.returnHtml = false;
                              basicSearch.searchModule = searchModule;
                  Severity: Minor
                  Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

                    Function registerMiddleClickScroll has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        registerMiddleClickScroll(container) {
                            let middleScroll = false;
                            container.on('mousedown', (e) => {
                                let clickedMouseButton = e.which; // get clicked button id
                                if (clickedMouseButton == 2 && middleScroll == false) {
                    Severity: Minor
                    Found in public_html/layouts/resources/app.js - About 1 hr to fix

                      Function validate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              validate: function () {
                                  let fieldValue = this.getFieldValue(),
                                      groupSeperator = CONFIG.currencyGroupingSeparator,
                                      integerRegex = new RegExp('(^[-+]?[\\d\\' + groupSeperator + ']+)$', 'g');
                                  if (!fieldValue.match(integerRegex)) {
                      Severity: Minor
                      Found in public_html/layouts/resources/validator/FieldValidator.js - About 1 hr to fix

                        Method exportSharingAccess has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function exportSharingAccess(ModuleBasic $moduleInstance)
                            {
                                $permission = (new \App\Db\Query())->select(['permission'])->from('vtiger_def_org_share')->where(['tabid' => $moduleInstance->id])->column();
                                if (empty($permission)) {
                                    return;
                        Severity: Minor
                        Found in vtlib/Vtiger/PackageExport.php - About 1 hr to fix

                          Method addLink has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)
                              {
                                  $db = \App\Db::getInstance();
                                  if (0 != $tabid) {
                                      $exists = (new \App\Db\Query())->from('vtiger_links')
                          Severity: Minor
                          Found in vtlib/Vtiger/Link.php - About 1 hr to fix

                            Method updateBlocks has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function updateBlocks($modulenode, $moduleInstance)
                                {
                                    if (empty($modulenode->blocks) || empty($modulenode->blocks->block)) {
                                        return;
                                    }
                            Severity: Minor
                            Found in vtlib/Vtiger/PackageUpdate.php - About 1 hr to fix

                              Method findError has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function findError(): void
                                  {
                                      $source = $this->driver->getPageSource();
                                      if (false !== stripos($source, 'YetiError!!!')) {
                                          // @codeCoverageIgnoreStart
                              Severity: Minor
                              Found in tests/GuiBase.php - About 1 hr to fix

                                Method testAddSharedAccessPolicy has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function testAddSharedAccessPolicy()
                                    {
                                        $sourceId = 'Groups:2';
                                        $targetId = 'Groups:2';
                                        $permission = 0;
                                Severity: Minor
                                Found in tests/Settings/SharingAccess.php - About 1 hr to fix

                                  Method testAddGroups has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function testAddGroups()
                                      {
                                          $modules = ['4', '7'];
                                          $recordModel = \Settings_Groups_Record_Model::getCleanInstance();
                                          $recordModel->set('groupname', 'Test groups');
                                  Severity: Minor
                                  Found in tests/Settings/Groups.php - About 1 hr to fix

                                    Method getByRecordModel has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function getByRecordModel(string $view, \Vtiger_Record_Model $recordModel, bool $cache = true): array
                                        {
                                            $cacheKey = $view . $recordModel->getId();
                                            if ($cache && isset(self::$recordModelCache[$cacheKey])) {
                                                return self::$recordModelCache[$cacheKey];
                                    Severity: Minor
                                    Found in app/FieldsDependency.php - About 1 hr to fix

                                      Method delete has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function delete($key)
                                          {
                                              if (isset($this->purifiedValuesByGet[$key])) {
                                                  unset($this->purifiedValuesByGet[$key]);
                                              }
                                      Severity: Minor
                                      Found in app/Request.php - About 1 hr to fix

                                        Method download has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static function download(string $prefix)
                                            {
                                                if (!\App\RequestUtil::isNetConnection()) {
                                                    \App\Log::warning('ERR_NO_INTERNET_CONNECTION', __METHOD__);
                                                    static::$lastErrorMessage = 'ERR_NO_INTERNET_CONNECTION';
                                        Severity: Minor
                                        Found in app/Installer/Languages.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language