YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function registerChangeVal has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        registerChangeVal: function (content) {
            content.on('change', '.configField', function (e) {
                let target = $(e.currentTarget),
                    params = {
                        module: app.getModuleName(),

    Function registerChangeEvents has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            registerChangeEvents: function (container) {
                container.find('.js-status-change').on('click', function () {
                    let elements = $(this).closest('tr').find('.js-visibility');
                    if (elements.length) {
                        if (this.checked) {

      Function registerAutoFillHours has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              registerAutoFillHours: function (container) {
                  const thisInstance = this;
                  let allDay = container.find('[name="allday"]'),
                      timeStart = container.find('[name="time_start"]'),
                      timeEnd = container.find('[name="time_end"]'),
      Severity: Minor
      Found in public_html/layouts/basic/modules/Calendar/resources/Edit.js - About 1 hr to fix

        Function preQuickCreateSave has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    let preQuickCreateSave = function (data) {
                        let index, queryParam, queryParamComponents;
                        let queryParameters = [];
        
                        //To handle switch to task tab when click on add task from related list of activities
        Severity: Minor
        Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 1 hr to fix

          Function clearFieldValue has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  clearFieldValue: function (element) {
                      const self = this;
                      let fieldValueContener = element.closest('.fieldValue');
                      let fieldNameElement = fieldValueContener.find('.sourceField');
                      let fieldName = fieldNameElement.attr('name');
          Severity: Minor
          Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 1 hr to fix

            Function registerContentEvents has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    registerContentEvents() {
                        const container = this.getContainer();
                        $('.js-history-detail', container).on('click', (e) => {
                            let actionId = e.currentTarget.dataset.action;
                            let widgetData = JSON.parse(container.find('.js-widget-data').val());

              Function getDiscount has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      getDiscount: function (row) {
                          let discountParams = row.find('.discountParam').val();
                          if (discountParams == '' || discountParams == 'null' || discountParams == '[]' || discountParams == undefined) {
                              return 0;
                          }
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 1 hr to fix

                Function registerUnreviewedCountEvent has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        registerUnreviewedCountEvent: function () {
                            let ids = [],
                                listViewContentDiv = this.getListViewContentContainer(),
                                isUnreviewedActive = listViewContentDiv.find('.unreviewed').length;
                            listViewContentDiv.find('tr.listViewEntries').each(function () {
                Severity: Minor
                Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

                  Function getListViewRecords has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          getListViewRecords: function (urlParams) {
                              let aDeferred = $.Deferred();
                              if (typeof urlParams === 'undefined') {
                                  urlParams = {};
                              }
                  Severity: Minor
                  Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

                    Function loadCalendarData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            loadCalendarData: function () {
                                this.fullCalendar.removeAllEvents();
                                const start_date = App.Fields.Date.dateToUserFormat(this.fullCalendar.view.activeStart),
                                    end_date = App.Fields.Date.dateToUserFormat(this.fullCalendar.view.activeEnd),
                                    parent = this.getContainer();

                      Function triggerMassMargin has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              triggerMassMargin: function () {
                                  const self = Vtiger_RelatedList_Js.relatedListInstance;
                                  let selected_ids = self.readSelectedIds(true),
                                      excluded_ids = self.readExcludedIds(true);
                                  if (self.checkListRecordSelected() !== true) {

                        Function getRecordsList has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                getRecordsList: function () {
                                    let thisInstance = this;
                                    let container = thisInstance.getContainer();
                                    let progressIndicator = jQuery.progressIndicator({
                                        message: app.vtranslate('JS_LOADING_OF_RECORDS'),
                        Severity: Minor
                        Found in public_html/layouts/basic/modules/Vtiger/resources/TreeRecords.js - About 1 hr to fix

                          Function registerMainCheckBoxClickEvent has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  registerMainCheckBoxClickEvent: function () {
                                      let listViewPageDiv = this.getListViewContainer();
                                      let thisInstance = this;
                                      listViewPageDiv.on('click', '#listViewEntriesMainCheckBox', function () {
                                          let selectedIds = thisInstance.readSelectedIds();
                          Severity: Minor
                          Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

                            Function registerImageEvents has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                registerImageEvents() {
                                    let fileInput = this.container.find('.js-icon-file');
                                    if (fileInput.length) {
                                        let fieldInfo = fileInput.data('fieldinfo') || {};
                                        this.container.find('.js-image-add').on('click', () => {
                            Severity: Minor
                            Found in public_html/layouts/basic/components/MediaModal.js - About 1 hr to fix

                              Function loadSavedMap has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      loadSavedMap: function () {
                                          var selectedMapElement = jQuery('#saved_maps option:selected');
                                          var mapId = selectedMapElement.attr('id');
                                          var fieldsList = jQuery('.fieldIdentifier');
                                          var deleteMapContainer = jQuery('#delete_map_container');
                              Severity: Minor
                              Found in public_html/layouts/basic/modules/Import/resources/Import.js - About 1 hr to fix

                                Method createFiles has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function createFiles(Field $entityField)
                                    {
                                        $targetpath = 'modules/' . $this->name;
                                
                                        if (!is_file($targetpath)) {
                                Severity: Minor
                                Found in vtlib/Vtiger/Module.php - About 1 hr to fix

                                  Method getFilter has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getFilter(): \SebastianBergmann\CodeCoverage\Filter
                                      {
                                          if (!isset($this->filter)) {
                                              $filter = new \SebastianBergmann\CodeCoverage\Filter();
                                              $filter->includeDirectory(ROOT_DIRECTORY . '/api');
                                  Severity: Minor
                                  Found in tests/Coverage.php - About 1 hr to fix

                                    Method getComponentClassName has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function getComponentClassName($componentType, $componentName, $moduleName = 'Vtiger', $throwException = true)
                                        {
                                            $cacheKey = "$componentType|$componentName|$moduleName";
                                            if (isset(self::$componentClassCache[$cacheKey])) {
                                                return self::$componentClassCache[$cacheKey];
                                    Severity: Minor
                                    Found in include/Loader.php - About 1 hr to fix

                                      Method sanitizeInventoryValues has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function sanitizeInventoryValues(array $inventoryRow, array $inventoryFields): array
                                          {
                                              $inventoryEntries = [];
                                              foreach ($inventoryFields as $columnName => $field) {
                                                  $value = $inventoryRow[$columnName];
                                      Severity: Minor
                                      Found in app/Export/Records.php - About 1 hr to fix

                                        Method passwordAuth has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function passwordAuth(): void
                                            {
                                                $this->climate->arguments->add([
                                                    'login' => [
                                                        'prefix' => 'l',
                                        Severity: Minor
                                        Found in app/Cli/Users.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language