YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Method getDisplayValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
Severity: Minor
Found in modules/Vtiger/uitypes/CurrencyInventory.php - About 35 mins to fix

    Method getDisplayValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
    Severity: Minor
    Found in modules/Vtiger/uitypes/Time.php - About 35 mins to fix

      Method getDisplayValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
      Severity: Minor
      Found in modules/Vtiger/uitypes/Tree.php - About 35 mins to fix

        Method getDisplayValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
        Severity: Minor
        Found in modules/Vtiger/uitypes/MultiEmail.php - About 35 mins to fix

          Method getAllRelations has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static function getAllRelations(Vtiger_Module_Model $moduleModel, bool $selected = true, bool $onlyActive = true, bool $permissions = true, string $key = 'relation_id')
          Severity: Minor
          Found in modules/Vtiger/models/Relation.php - About 35 mins to fix

            Method updateRecordByModel has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function updateRecordByModel($record, $fieldData, $moduleName = false, ?int $relationId = 0, ?int $sourceId = 0)
            Severity: Minor
            Found in modules/Import/actions/Data.php - About 35 mins to fix

              Function validate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      validate: function () {
                          var response = this._super();
                          if (response != true) {
                              return response;
                          } else {

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function validate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      validate: function () {
                          var response = this._super();
                          if (response != true) {
                              return response;
                          } else {

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function registerSelectOptionEvent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      registerSelectOptionEvent: (data) => {
                          $('.useField,.useFunction', data).on('change', (e) => {
                              let currentElement = $(e.currentTarget);
                              let newValue = currentElement.val();
                              let oldValue = data.find('.fieldValue').filter(':visible').val(),
              Severity: Minor
              Found in public_html/layouts/basic/modules/Settings/Workflows/resources/Edit.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function registerLinkEvent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      registerLinkEvent: function () {
                          $('#page').on('click', 'a', function (e) {
                              e.preventDefault();
                              let target = $(this);
                              if (!target.closest('div').hasClass('fieldValue') || target.hasClass('showReferenceTooltip')) {
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/DetailPreview.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function getInstanceByView has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      getInstanceByView: function () {
                          let viewName = this.viewName ? this.viewName : app.getViewName();
                          let instance = false;
                          if (viewName === 'RecordsList') {
                              instance = this.reletedInstance;
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/ListSearch.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function loadWidget has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      loadWidget: function (widgetContainer, params) {
                          const thisInstance = this,
                              contentContainer = $('.js-detail-widget-content', widgetContainer);
                          let relatedModuleName;
                          this.registerFilterForAddingModuleRelatedRecordFromSummaryWidget(widgetContainer);
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function markSelectedRecords has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      markSelectedRecords: function () {
                          var thisInstance = this;
                          var selectedIds = this.readSelectedIds();
                          if (selectedIds != '') {
                              if (selectedIds == 'all') {
              Severity: Minor
              Found in public_html/layouts/basic/modules/Campaigns/resources/List.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function registerSelectOptionEvent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      registerSelectOptionEvent: function (data) {
                          $('.useField,.useFunction', data).on('change', function (e) {
                              let currentElement = jQuery(e.currentTarget);
                              let newValue = currentElement.val();
                              let oldValue = data.find('.fieldValue').filter(':visible').val();
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/AdvanceFilterEx.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function triggerRecordEditEvents has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      triggerRecordEditEvents: function (data) {
                          const self = this,
                              form = this.getForm();
                          if (typeof data['changeValues'] == 'object') {
                              $.each(data['changeValues'], function (_, field) {
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function setFieldValue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      setFieldValue: function (params) {
                          const fieldElement = this.getForm().find(`[name="${params['fieldName']}"]`),
                              fieldInfo = fieldElement.data('fieldinfo');
                          if (fieldElement.is('select')) {
                              if (fieldElement.find(`option[value="${params['value']}"]`).length) {
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function setCalendarModuleOptions has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  setCalendarModuleOptions() {
                      const self = this;
                      return {
                          allDaySlot: app.getMainParams('allDaySlot'),
                          dateClick: (args) => {
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/CalendarView.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function triggerSendEmail has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      triggerSendEmail: function (params, callBackFunction, row) {
                          let listInstance = Vtiger_List_Js.getInstance();
                          if (row) {
                              listInstance.listViewContentContainer = row.closest('.js-list__form');
                          }
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function triggerMassMargin has a Cognitive Complexity of 7 (exceeds 5 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) {
              Severity: Minor
              Found in public_html/layouts/basic/modules/PriceBooks/resources/RelatedList.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function removeSelectedOptions has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                      removeSelectedOptions: function (objName) {
                          var obj = jQuery(objName);
                          if (!obj.length) {
                              return;
                          }
              Severity: Minor
              Found in public_html/layouts/basic/modules/Import/resources/Import.js - About 35 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Severity
              Category
              Status
              Source
              Language