Showing 7,873 of 7,873 total issues
Function moveTV
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,moveTV: function(tvs,tab) {
if (!Ext.isArray(tvs)) { tvs = [tvs]; }
var tvp = Ext.getCmp('modx-panel-resource-tv');
if (!tvp) { 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"
Further reading
Function insertAtCursor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
MODx.insertAtCursor = function(myField, myValue,h) {
if (!Ext.isEmpty(h)) {
var z = h(myValue);
if (z != undefined) {
myValue = z;
- 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 addSourceToolbar
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,addSourceToolbar: function() {
this.sourceCombo = new MODx.combo.MediaSource({
value: this.config.source || MODx.config.default_media_source
,listWidth: 236
,listeners: {
- 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 _getNextActiveTab
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,_getNextActiveTab: function(tp,tab) {
if (MODx.hiddenTabs.indexOf(tab) != -1) {
var id;
for (var i=0;i<tp.items.items.length;i++) {
id = tp.items.items[i].id;
- 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 CreateContentType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
MODx.window.CreateContentType = function(config) {
config = config || {};
this.ident = config.ident || 'modx-cct'+Ext.id();
Ext.applyIf(config,{
title: _('content_type_new')
- 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 Dashboard
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
MODx.panel.Dashboard = function(config) {
config = config || {};
Ext.applyIf(config,{
id: 'modx-panel-dashboard'
,url: MODx.config.connector_url
- 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 getDefaultSortBy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,getDefaultSortBy: function(config) {
var v = 'menuindex';
if (!Ext.isEmpty(config) && !Ext.isEmpty(config.sortBy)) {
v = config.sortBy;
} 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 success
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,success: function(r) {
if (MODx.request.id) Ext.getCmp('modx-grid-element-properties').save();
Ext.getCmp('modx-grid-template-tv').getStore().commitChanges();
this.getForm().setValues(r.result.object);
- 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 getMenu
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getMenu: function () {
var r = this.getSelectionModel().getSelected();
var p = r.data.cls;
var m = [];
- 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 formatData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,formatData: function(data) {
var formatSize = function(size){
if(size < 1024) {
return size + " bytes";
} 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 success
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,success: function(o) {
if (Ext.isEmpty(this.config.record) || Ext.isEmpty(this.config.record.id)) {
MODx.loadPage('source/update', 'id='+o.result.object.id);
} else {
Ext.getCmp('modx-abtn-save').setDisabled(false);
- 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 Source
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
MODx.panel.Source = function(config) {
config = config || {};
Ext.applyIf(config,{
id: 'modx-panel-source'
,url: MODx.config.connector_url
- 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 _initExpand
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,_initExpand: function () {
var treeState = Ext.state.Manager.get(this.treestate_id);
if (Ext.isEmpty(treeState) && this.root) {
this.root.expand();
if (this.root.firstChild && this.config.expandFirst) {
- 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 success
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,success: function(r) {
if (MODx.request.id) Ext.getCmp('modx-grid-element-properties').save();
this.getForm().setValues(r.result.object);
var t = Ext.getCmp('modx-tree-element');
- 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 getMenu
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,getMenu: function() {
var def = this.isDefaultPropSet();
var r = this.menu.record;
var m = [];
- 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 Window
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
MODx.Window = function(config) {
config = config || {};
Ext.applyIf(config,{
modal: false
,layout: 'auto'
- 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 proceed
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,proceed: function(panel) {
var tb = this.getBottomToolbar();
if (!tb) return false;
this.getLayout().setActiveItem(panel);
- 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 success
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,success: function(o) {
if (MODx.request.id) Ext.getCmp('modx-grid-element-properties').save();
Ext.getCmp('modx-grid-plugin-event').getStore().commitChanges();
this.getForm().setValues(o.result.object);
- 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 handleChangeParent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,handleChangeParent: function(node,e) {
var t = Ext.getCmp('modx-resource-tree');
if (!t) { return false; }
t.disableHref = 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 loadWindow
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
,loadWindow: function(btn,e,win,or) {
var r = this.menu.record;
if (!this.windows[win.xtype] || win.force) {
Ext.applyIf(win,{
record: win.blankValues ? {} : r
- 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"