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)
Method getDisplayValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
Method getDisplayValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
Method getDisplayValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
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')
Method updateRecordByModel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function updateRecordByModel($record, $fieldData, $moduleName = false, ?int $relationId = 0, ?int $sourceId = 0)
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 {
- Read upRead up
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 {
- Read upRead up
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(),
- Read upRead up
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')) {
- Read upRead up
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;
- Read upRead up
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);
- Read upRead up
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') {
- Read upRead up
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();
- Read upRead up
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) {
- Read upRead up
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) {
- Read upRead up
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) => {
- Read upRead up
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');
}
- Read upRead up
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) {
- Read upRead up
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;
}
- Read upRead up
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"